Class LinearActuatorBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
All Implemented Interfaces:
IHaveCustomOverlayIcon, IHaveGoggleInformation, IHaveHoveringInformation, PartialSafeNBT, SpecialBlockEntityItemRequirement, IControlContraption, IDisplayAssemblyExceptions, IInteractionChecker, net.createmod.ponder.api.VirtualBlockEntity, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension
Direct Known Subclasses:
MechanicalPistonBlockEntity, PulleyBlockEntity

public abstract class LinearActuatorBlockEntity extends KineticBlockEntity implements IControlContraption, IDisplayAssemblyExceptions
  • Field Details

    • offset

      public float offset
    • running

      public boolean running
    • assembleNextTick

      public boolean assembleNextTick
    • needsContraption

      public boolean needsContraption
    • movedContraption

      public AbstractContraptionEntity movedContraption
    • forceMove

      protected boolean forceMove
    • movementMode

    • waitingForSpeedChange

      protected boolean waitingForSpeedChange
    • lastException

      protected AssemblyException lastException
    • sequencedOffsetLimit

      protected double sequencedOffsetLimit
    • clientOffsetDiff

      protected float clientOffsetDiff
  • Constructor Details

    • LinearActuatorBlockEntity

      public LinearActuatorBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> typeIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • addBehaviours

      public void addBehaviours(List<BlockEntityBehaviour> behaviours)
      Overrides:
      addBehaviours in class KineticBlockEntity
    • syncSequenceContext

      protected boolean syncSequenceContext()
      Overrides:
      syncSequenceContext in class KineticBlockEntity
    • tick

      public void tick()
      Overrides:
      tick in class KineticBlockEntity
    • isPassive

      protected boolean isPassive()
    • lazyTick

      public void lazyTick()
      Overrides:
      lazyTick in class SmartBlockEntity
    • getGridOffset

      protected int getGridOffset(float offset)
    • getInterpolatedOffset

      public float getInterpolatedOffset(float partialTicks)
    • onSpeedChanged

      public void onSpeedChanged(float prevSpeed)
      Overrides:
      onSpeedChanged in class KineticBlockEntity
    • remove

      public void remove()
      Description copied from class: SmartBlockEntity
      Block destroyed or picked up by a contraption. Usually detaches kinetics
      Overrides:
      remove in class KineticBlockEntity
    • write

      protected void write(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      write in class KineticBlockEntity
    • read

      protected void read(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      read in class KineticBlockEntity
    • getLastAssemblyException

      public AssemblyException getLastAssemblyException()
      Specified by:
      getLastAssemblyException in interface IDisplayAssemblyExceptions
    • disassemble

      public abstract void disassemble()
    • assemble

      protected abstract void assemble() throws AssemblyException
      Throws:
      AssemblyException
    • getExtensionRange

      protected abstract int getExtensionRange()
    • getInitialOffset

      protected abstract int getInitialOffset()
    • getMovementModeSlot

      protected abstract ValueBoxTransform getMovementModeSlot()
    • toMotionVector

      protected abstract net.minecraft.world.phys.Vec3 toMotionVector(float speed)
    • toPosition

      protected abstract net.minecraft.world.phys.Vec3 toPosition(float offset)
    • visitNewPosition

      protected void visitNewPosition()
    • tryDisassemble

      protected void tryDisassemble()
    • getMovementMode

      protected IControlContraption.MovementMode getMovementMode()
    • moveAndCollideContraption

      protected boolean moveAndCollideContraption()
    • collided

      protected void collided()
    • resetContraptionToOffset

      protected void resetContraptionToOffset()
    • getMovementSpeed

      public float getMovementSpeed()
    • getMotionVector

      public net.minecraft.world.phys.Vec3 getMotionVector()
    • onStall

      public void onStall()
      Specified by:
      onStall in interface IControlContraption
    • onLengthBroken

      public void onLengthBroken()
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface IControlContraption
    • attach

      public void attach(ControlledContraptionEntity contraption)
      Specified by:
      attach in interface IControlContraption
    • isAttachedTo

      public boolean isAttachedTo(AbstractContraptionEntity contraption)
      Specified by:
      isAttachedTo in interface IControlContraption
    • getBlockPosition

      public net.minecraft.core.BlockPos getBlockPosition()
      Specified by:
      getBlockPosition in interface IControlContraption