Skip to content

com.hypixel.hytale.component

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 handlesComponentType, ResourceType, and SystemType are generic handles that provide compile-time safety
  • Plugin lifecycle integrationComponentRegistryProxy auto-unregisters plugin types on shutdown
TypeKindDescription
StoreclassCentral ECS data container holding entities, components, and resources.
ComponentRegistryclassRegistry managing all ECS type registrations and maintaining stores.
IComponentRegistryinterfacePlugin-facing registration interface.
ComponentRegistryProxyclassPlugin-scoped proxy with automatic unregistration on shutdown.
TypeKindDescription
ComponentinterfaceRoot interface for all per-entity ECS data.
ResourceinterfaceRoot interface for per-store singleton data.
ArchetypeclassImmutable set of ComponentTypes defining an entity shape.
ArchetypeChunkclassColumnar storage for entities sharing the same archetype.
TypeKindDescription
ComponentTypeclassTyped handle for a registered component; also usable as a Query.
ResourceTypeclassTyped handle for a registered resource.
SystemTypeclassTyped handle for a system category.
SystemGroupclassGroups systems for dependency-based execution ordering.
TypeKindDescription
RefclassLightweight O(1) entity reference handle.
HolderclassPortable entity data container for add/remove/serialize operations.
WeakComponentReferenceclassWeak reference to a specific component on a specific entity.
TypeKindDescription
CommandBufferclassDeferred command queue for safe mutations during system processing.
ComponentAccessorinterfaceUnified read/write interface implemented by Store and CommandBuffer.
TypeKindDescription
ComponentRegistrationrecordFull metadata record for a registered component type.
ResourceRegistrationrecordFull metadata record for a registered resource type.
TypeKindDescription
AddReasonenumSPAWN or LOAD — why an entity is being added.
RemoveReasonenumREMOVE or UNLOAD — why an entity is being removed.
TypeKindDescription
NonSerializedclassMarker component preventing entity serialization.
NonTickingclassMarker component excluding entity from tick processing.
TypeKindDescription
IResourceStorageinterfacePersistence interface for loading/saving resources.
EmptyResourceStorageclassNo-op implementation for non-persistent stores.
TypeKindDescription
ReadWriteQueryclassQuery distinguishing read-only from read-write component access.
TypeKindDescription
DisableProcessingAssertinterfaceDeprecated marker for disabling write-processing assertions.

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.