Class AssemblyControllerBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
All Implemented Interfaces:
IAssemblyMachine, IGUIButtonSensitive, ILuaMethodProvider, IMinWorkingPressure, IDescSynced, IUpgradeHolder, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>, net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>, net.minecraftforge.common.extensions.IForgeBlockEntity, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class AssemblyControllerBlockEntity extends AbstractAirHandlingBlockEntity implements IAssemblyMachine, IMinWorkingPressure, net.minecraft.world.MenuProvider
  • Field Details

    • curProgram

      public AssemblyProgram curProgram
    • isMachineMissing

      public boolean isMachineMissing
    • isMachineDuplicate

      public boolean isMachineDuplicate
    • missingMachine

      public AssemblyProgram.EnumMachine missingMachine
    • duplicateMachine

      public AssemblyProgram.EnumMachine duplicateMachine
    • displayedText

      public String displayedText
    • hasProblem

      public boolean hasProblem
  • Constructor Details

    • AssemblyControllerBlockEntity

      public AssemblyControllerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • getInventoryCap

      protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler> getInventoryCap(net.minecraft.core.Direction side)
      Overrides:
      getInventoryCap in class AbstractPneumaticCraftBlockEntity
    • getPrimaryInventory

      public net.minecraftforge.items.IItemHandler getPrimaryInventory()
      Specified by:
      getPrimaryInventory in class AbstractPneumaticCraftBlockEntity
    • tickCommonPre

      public void tickCommonPre()
      Description copied from class: AbstractTickingBlockEntity
      Called on both server and client, before anything else
      Overrides:
      tickCommonPre in class AbstractAirHandlingBlockEntity
    • tickServer

      public void tickServer()
      Overrides:
      tickServer in class AbstractTickingBlockEntity
    • shouldRerenderChunkOnDescUpdate

      protected boolean shouldRerenderChunkOnDescUpdate()
      Overrides:
      shouldRerenderChunkOnDescUpdate in class AbstractPneumaticCraftBlockEntity
    • findMachines

      public List<IAssemblyMachine> findMachines(int max)
    • onNeighborBlockUpdate

      public void onNeighborBlockUpdate(net.minecraft.core.BlockPos fromPos)
      Description copied from class: AbstractPneumaticCraftBlockEntity
      Called when a neighboring block changes state (i.e. blockstate update)
      Overrides:
      onNeighborBlockUpdate in class AbstractAirHandlingBlockEntity
      Parameters:
      fromPos - the blockpos of the block that caused this update
    • canConnectPneumatic

      public boolean canConnectPneumatic(net.minecraft.core.Direction side)
      Description copied from class: AbstractAirHandlingBlockEntity
      Checks if the given side of this BE can be pneumatically connected to.
      Overrides:
      canConnectPneumatic in class AbstractAirHandlingBlockEntity
      Parameters:
      side - the side to check
      Returns:
      true if connected, false otherwise
    • getRenderBoundingBox

      public net.minecraft.world.phys.AABB getRenderBoundingBox()
      Specified by:
      getRenderBoundingBox in interface net.minecraftforge.common.extensions.IForgeBlockEntity
    • load

      public void load(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      load in class AbstractAirHandlingBlockEntity
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveAdditional in class AbstractAirHandlingBlockEntity
    • isIdle

      public boolean isIdle()
      Description copied from interface: IAssemblyMachine
      Returns true when the machine is done with moving/drilling/... and has returned to its idle position
      Specified by:
      isIdle in interface IAssemblyMachine
      Returns:
      true when the machine is idle
    • setSpeed

      public void setSpeed(float speed)
      Description copied from interface: IAssemblyMachine
      Sets the speed of the machine, used when Speed Upgrades are inserted in the Assembly Controller
      Specified by:
      setSpeed in interface IAssemblyMachine
      Parameters:
      speed - the speed
    • getMinWorkingPressure

      public float getMinWorkingPressure()
      Description copied from interface: IMinWorkingPressure
      Get the minimum pressure at which this machine can operate. Used for GUI display purposes (drawing the yellow region of the pressure gauge, but can also be checked elsewhere.
      Specified by:
      getMinWorkingPressure in interface IMinWorkingPressure
      Returns:
      the minimum pressure at which this machine can operate
    • getAssemblyType

      public AssemblyProgram.EnumMachine getAssemblyType()
      Description copied from interface: IAssemblyMachine
      Get this machine's type.
      Specified by:
      getAssemblyType in interface IAssemblyMachine
      Returns:
      the type of assembly machine.
    • setControllerPos

      public void setControllerPos(net.minecraft.core.BlockPos controllerPos)
      Description copied from interface: IAssemblyMachine
      Inform this machine of its controller's position.
      Specified by:
      setControllerPos in interface IAssemblyMachine
      Parameters:
      controllerPos - the controller's blockpos
    • createMenu

      @Nullable public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int i, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity)
      Specified by:
      createMenu in interface net.minecraft.world.inventory.MenuConstructor