BlockEntitySystems
Package: com.hypixel.hytale.server.core.modules.entity
public class BlockEntitySystemsContainer class for ECS systems that manage block entities — entities that represent in-world blocks with additional behavior (physics, network tracking, visual updates). All inner systems operate on EntityStore and are registered by EntityModule during setup.
Inner Classes
Section titled “Inner Classes”BlockEntitySetupSystem
Section titled “BlockEntitySetupSystem”public static class BlockEntitySetupSystem extends HolderSystem<EntityStore>Initialization system triggered when a block entity is added to the store. Performs the following setup:
- Assigns a
NetworkIdif the archetype does not already contain one. - Creates a
BoundingBoxfrom theBlockEntitycomponent. Falls back to a 1x1x1 box if creation fails. - Initializes physics via
BlockEntity.initPhysics()with movement-out-of-solid disabled.
Queries for entities matching the BlockEntity component type.
BlockEntityTrackerSystem
Section titled “BlockEntityTrackerSystem”public static class BlockEntityTrackerSystem extends EntityTickingSystem<EntityStore>Per-tick system that sends block entity state updates to visible players. Runs in the EntityTrackerSystems.QUEUE_UPDATE_GROUP system group.
On each tick, checks whether the block ID or entity scale has changed since the last update. If either is outdated, queues a BlockUpdate packet to all viewers. For newly visible viewers, always sends the current state.
Supports parallel execution via EntityTickingSystem.maybeUseParallel().
Queries for entities matching both the Visible and BlockEntity component types.
Ticking
Section titled “Ticking”public static class Ticking extends EntityTickingSystem<EntityStore> implements DisableProcessingAssertPer-tick physics system for block entities. Ticks the SimplePhysicsProvider from the block entity’s component using the entity’s TransformComponent, Velocity, and world reference.
If the physics tick throws an exception, the entity is logged and removed via RemoveReason.REMOVE.
Queries for entities matching the archetype of TransformComponent, BlockEntity, and Velocity.
Related Types
Section titled “Related Types”- EntityModule — registers all three systems during setup
- DespawnSystem — another entity lifecycle system in this package
- LegacyProjectileSystems — similar system container for projectile entities
BlockEntity— the ECS component these systems operate onBoundingBox— bounding box component initialized by the setup systemEntityTrackerSystems.Visible— visibility tracking used by the tracker system