Class AbstractAssemblyRobotBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
IAssemblyMachine, IGUIButtonSensitive, ILuaMethodProvider, IResettable, IDescSynced, IUpgradeHolder, 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>
Direct Known Subclasses:
AssemblyDrillBlockEntity, AssemblyIOUnitBlockEntity, AssemblyLaserBlockEntity

public abstract class AbstractAssemblyRobotBlockEntity extends AbstractTickingBlockEntity implements IAssemblyMachine, IResettable
  • Field Details

    • oldAngles

      public final float[] oldAngles
    • angles

      public final float[] angles
    • speed

      protected float speed
  • Method Details

    • 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
    • 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 AbstractPneumaticCraftBlockEntity
      Parameters:
      fromPos - the blockpos of the block that caused this update
    • tickCommonPre

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

      public void gotoHomePosition()
    • gotoNeighbour

      public boolean gotoNeighbour(@Nonnull me.desht.pneumaticcraft.common.block.entity.AbstractAssemblyRobotBlockEntity.TargetDirections newDirections)
      Instruct the robot arm to start moving to the neighbour in the given direction(s).
      Parameters:
      newDirections - the direction(s) to move in
      Returns:
      true if the neighbour is diagonal to this arm
    • load

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

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

      protected abstract boolean canMoveToDiagonalNeighbours()
    • getRenderBoundingBox

      public net.minecraft.world.phys.AABB getRenderBoundingBox()
      Specified by:
      getRenderBoundingBox in interface net.minecraftforge.common.extensions.IForgeBlockEntity
    • 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