Package: com.hypixel.hytale.component
The core ECS (Entity Component System) framework for Hytale. This package provides the fundamental building blocks for all gameplay data: entities are collections of Component instances organized into Archetype groups, stored in Store containers, and processed by registered systems. The framework supports two store types — EntityStore for entities (players, NPCs, flocks) and ChunkStore for world chunks.
Key architectural concepts:
- Archetype-based storage — entities with identical component sets share an ArchetypeChunk, enabling cache-friendly iteration
- Deferred mutations — systems use CommandBuffer to queue structural changes, preventing concurrent modification during iteration
- Type-safe handles — ComponentType, ResourceType, and SystemType are generic handles that provide compile-time safety
- Plugin lifecycle integration — ComponentRegistryProxy auto-unregisters plugin types on shutdown
| Type | Kind | Description |
|---|
| Store | class | Central ECS data container holding entities, components, and resources. |
| ComponentRegistry | class | Registry managing all ECS type registrations and maintaining stores. |
| IComponentRegistry | interface | Plugin-facing registration interface. |
| ComponentRegistryProxy | class | Plugin-scoped proxy with automatic unregistration on shutdown. |
| Type | Kind | Description |
|---|
| Component | interface | Root interface for all per-entity ECS data. |
| Resource | interface | Root interface for per-store singleton data. |
| Archetype | class | Immutable set of ComponentTypes defining an entity shape. |
| ArchetypeChunk | class | Columnar storage for entities sharing the same archetype. |
| Type | Kind | Description |
|---|
| ComponentType | class | Typed handle for a registered component; also usable as a Query. |
| ResourceType | class | Typed handle for a registered resource. |
| SystemType | class | Typed handle for a system category. |
| SystemGroup | class | Groups systems for dependency-based execution ordering. |
| Type | Kind | Description |
|---|
| Ref | class | Lightweight O(1) entity reference handle. |
| Holder | class | Portable entity data container for add/remove/serialize operations. |
| WeakComponentReference | class | Weak reference to a specific component on a specific entity. |
| Type | Kind | Description |
|---|
| CommandBuffer | class | Deferred command queue for safe mutations during system processing. |
| ComponentAccessor | interface | Unified read/write interface implemented by Store and CommandBuffer. |
| Type | Kind | Description |
|---|
| AddReason | enum | SPAWN or LOAD — why an entity is being added. |
| RemoveReason | enum | REMOVE or UNLOAD — why an entity is being removed. |
| Type | Kind | Description |
|---|
| NonSerialized | class | Marker component preventing entity serialization. |
| NonTicking | class | Marker component excluding entity from tick processing. |
| Type | Kind | Description |
|---|
| ReadWriteQuery | class | Query distinguishing read-only from read-write component access. |
This package has several sub-packages (documented separately when in the API surface):
com.hypixel.hytale.component.system — system base classes (EcsEvent, RefSystem, EntityTickingSystem, etc.)
com.hypixel.hytale.component.event — ECS event type handles (EntityEventType, WorldEventType)
com.hypixel.hytale.component.query — query combinators (AndQuery, OrQuery, NotQuery, etc.)
com.hypixel.hytale.component.dependency — system ordering (Dependency, DependencyGraph, Order)
com.hypixel.hytale.component.spatial — spatial indexing (SpatialResource, KDTree, MortonCode)
com.hypixel.hytale.component.data — internal data structures
com.hypixel.hytale.component.metric — performance metrics
com.hypixel.hytale.component.task — parallel task infrastructure
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.