Class AssemblyProgram

java.lang.Object
me.desht.pneumaticcraft.common.recipes.assembly.AssemblyProgram
Direct Known Subclasses:
ProgramDrill, ProgramDrillLaser, ProgramLaser

public abstract class AssemblyProgram extends Object
  • Field Details

  • Constructor Details

    • AssemblyProgram

      public AssemblyProgram()
  • Method Details

    • getType

    • getRequiredMachines

      public abstract AssemblyProgram.EnumMachine[] 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

      public abstract boolean executeStep(AssemblyControllerBlockEntity.AssemblySystem system)
      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'.
    • validateBlockEntity

      public abstract boolean validateBlockEntity(AssemblyControllerBlockEntity.AssemblySystem system)
    • writeToNBT

      public abstract void writeToNBT(net.minecraft.nbt.CompoundTag tag)
    • readFromNBT

      public abstract void readFromNBT(net.minecraft.nbt.CompoundTag tag)
    • getRecipeList

      public abstract Collection<AssemblyRecipe> getRecipeList(net.minecraft.world.level.Level world)
    • addProgramProblem

      public void addProgramProblem(List<net.minecraft.network.chat.Component> problemList)
      You can add problem messages here if an assembly program has a problem with a certain step.
      Parameters:
      problemList - list to add to
    • fromRecipe

      public static AssemblyProgram fromRecipe(AssemblyRecipe recipe)
    • getItem

      public abstract AssemblyProgramItem getItem()