Class TransitionSealBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.hbm_m.blockentity.machines.TransitionSealBlockEntity
All Implemented Interfaces:
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 TransitionSealBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity
Core block entity of the transition seal multiblock. A 26 wide x 24 tall x 1 deep blast door driven by the 24 second transition_seal.dae open clip: while redstone power is applied (on the core or anywhere along the frame ring) the clip plays forward and the door opens, otherwise it plays in reverse and the door closes. The clip runs exactly 24 seconds, i.e. 480 ticks, with the frame ring spaced around the core.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
     
    static final float
    The transition_seal.dae clip is exactly 24 seconds long (577 LINEAR keyframes at 1/24 s).
    boolean
     
    boolean
    Target direction while animating: true = opening, false = closing
    boolean
    Previous redstone state used to implement toggle-on-pulse behaviour

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransitionSealBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    getAnimationTime(float partialTicks)
    Returns the animation time in seconds for the given partial tick, clamped to the 24 second clip.
    net.minecraft.world.phys.AABB
     
    boolean
     
    boolean
    True while the core or any block of the frame ring is receiving redstone power.
    void
    load(net.minecraft.nbt.CompoundTag tag)
     
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag tag)
     
    static void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TransitionSealBlockEntity be)
     
    void
     

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability, getCapability

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    deserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
  • Field Details

    • DURATION_TICKS

      public static final float DURATION_TICKS
      The transition_seal.dae clip is exactly 24 seconds long (577 LINEAR keyframes at 1/24 s).
      See Also:
    • animTicks

      public float animTicks
    • moving

      public boolean moving
    • opening

      public boolean opening
      Target direction while animating: true = opening, false = closing
    • prevPowered

      public boolean prevPowered
      Previous redstone state used to implement toggle-on-pulse behaviour
  • Constructor Details

    • TransitionSealBlockEntity

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

    • getAnimationTime

      public float getAnimationTime(float partialTicks)
      Returns the animation time in seconds for the given partial tick, clamped to the 24 second clip. The open clip is played forward while powered and reversed while unpowered; the finished pose is held once the door is fully open or closed.
    • isOpen

      public boolean isOpen()
    • isPowered

      public boolean isPowered()
      True while the core or any block of the frame ring is receiving redstone power. The frame ring surrounds the 26 x 24 wall, so a button or lever anywhere on the frame operates the door.
    • getRenderBoundingBox

      public net.minecraft.world.phys.AABB getRenderBoundingBox()
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TransitionSealBlockEntity be)
    • updateEntity

      public void updateEntity()
    • saveAdditional

      protected void saveAdditional(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • load

      public void load(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      load in class net.minecraft.world.level.block.entity.BlockEntity