Package com.hbm_m.blockentity.machines
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
FieldsModifier and TypeFieldDescriptionfloatstatic final floatThe transition_seal.dae clip is exactly 24 seconds long (577 LINEAR keyframes at 1/24 s).booleanbooleanTarget direction while animating: true = opening, false = closingbooleanPrevious redstone state used to implement toggle-on-pulse behaviourFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionTransitionSealBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionfloatgetAnimationTime(float partialTicks) Returns the animation time in seconds for the given partial tick, clamped to the 24 second clip.net.minecraft.world.phys.AABBbooleanisOpen()booleanTrue while the core or any block of the frame ring is receiving redstone power.voidload(net.minecraft.nbt.CompoundTag tag) protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) static voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TransitionSealBlockEntity be) voidMethods 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, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods 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_TICKSThe 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 openingTarget direction while animating: true = opening, false = closing -
prevPowered
public boolean prevPoweredPrevious 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:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-