Class BlockEntity

java.lang.Object
com.hypixel.hytale.server.core.modules.block.BlockEntity

public class BlockEntity extends Object
  • 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 with RemoveReason.UNLOAD so 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 null if 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:
      true if the block type's block entity template declares componentType.