Class AssemblyProgram
java.lang.Object
me.desht.pneumaticcraft.common.recipes.assembly.AssemblyProgram
- Direct Known Subclasses:
ProgramDrill,ProgramDrillLaser,ProgramLaser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProgramProblem(List<net.minecraft.network.chat.Component> problemList) You can add problem messages here if an assembly program has a problem with a certain step.abstract booleanExecutes the given step of the assembly program.static AssemblyProgramfromRecipe(AssemblyRecipe recipe) abstract AssemblyProgramItemgetItem()abstract Collection<AssemblyRecipe>getRecipeList(net.minecraft.world.level.Level world) abstract AssemblyProgram.EnumMachine[]Retrieves the needed machines for this Assembly Program.getType()abstract voidreadFromNBT(net.minecraft.nbt.CompoundTag tag) abstract voidwriteToNBT(net.minecraft.nbt.CompoundTag tag)
-
Field Details
-
curProblem
-
-
Constructor Details
-
AssemblyProgram
public AssemblyProgram()
-
-
Method Details
-
getType
-
getRequiredMachines
Retrieves the needed machines for this Assembly Program. As a Controller is always needed this doesn't have to be returned.- Returns:
- an array of machine types
-
executeStep
Executes the given step of the assembly program. It is given all the machines it is allowed to control. It's possible for the given machines to be null, but only if they aren't in the getRequiredMachines list.- Returns:
- true if the controller should use air and display 'running'. Return false to display 'standby'.
-
writeToNBT
public abstract void writeToNBT(net.minecraft.nbt.CompoundTag tag) -
readFromNBT
public abstract void readFromNBT(net.minecraft.nbt.CompoundTag tag) -
getRecipeList
-
addProgramProblem
You can add problem messages here if an assembly program has a problem with a certain step.- Parameters:
problemList- list to add to
-
fromRecipe
-
getItem
-