Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- setBlockEntity(ComponentAccessor, Ref, BlockComponentSection, int, int, int, BlockType, int, Holder)
- takeBlockEntity(ComponentAccessor, BlockComponentSection, int, int, int)
- ensureBlockEntity(ComponentAccessor, Ref, BlockComponentSection, int, int, int, BlockType, int)
- declaresComponent(BlockType, ComponentType)
Class BlockEntity
java.lang.Object
com.hypixel.hytale.server.core.modules.block.BlockEntity
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandeclaresComponent(BlockType blockType, ComponentType<ChunkStore, ?> componentType) static Ref<ChunkStore> ensureBlockEntity(ComponentAccessor<ChunkStore> accessor, Ref<ChunkStore> sectionRef, BlockComponentSection componentSection, int x, int y, int z, BlockType blockType, int filler) static voidsetBlockEntity(ComponentAccessor<ChunkStore> accessor, Ref<ChunkStore> sectionRef, BlockComponentSection componentSection, int x, int y, int z, BlockType blockType, int rotation, Holder<ChunkStore> holder) static Holder<ChunkStore> takeBlockEntity(ComponentAccessor<ChunkStore> accessor, BlockComponentSection componentSection, int x, int y, int z) Detaches the block entity at the given position, returning its holder so the caller can carry the entity's state to another location.
-
Constructor Details
-
BlockEntity
public BlockEntity()
-
-
Method Details
-
setBlockEntity
public static void setBlockEntity(@Nonnull ComponentAccessor<ChunkStore> accessor, @Nonnull Ref<ChunkStore> sectionRef, @Nonnull BlockComponentSection componentSection, int x, int y, int z, @Nonnull BlockType blockType, int rotation, @Nullable Holder<ChunkStore> holder) -
takeBlockEntity
@Nullable public static Holder<ChunkStore> takeBlockEntity(@Nonnull ComponentAccessor<ChunkStore> accessor, @Nonnull BlockComponentSection componentSection, int x, int y, int z) Detaches the block entity at the given position, returning its holder so the caller can carry the entity's state to another location. The block is leaving this location intact, so its stored row is tombstoned. A live entity is removed withRemoveReason.UNLOADso block-entity systems that react to destruction (item drops, and so on) are suppressed; a holder parked in a non-ticking section is taken directly.- Returns:
- the detached block entity holder, or
nullif the position has no block entity.
-
ensureBlockEntity
@Nullable public static Ref<ChunkStore> ensureBlockEntity(@Nonnull ComponentAccessor<ChunkStore> accessor, @Nonnull Ref<ChunkStore> sectionRef, @Nonnull BlockComponentSection componentSection, int x, int y, int z, @Nonnull BlockType blockType, int filler) -
declaresComponent
public static boolean declaresComponent(@Nonnull BlockType blockType, @Nonnull ComponentType<ChunkStore, ?> componentType) - Returns:
trueif the block type's block entity template declarescomponentType.
-