ComponentAccessor
Package: com.hypixel.hytale.component
public interface ComponentAccessor<ECS_TYPE>Unified interface for reading and mutating entity data and dispatching ECS events. Both Store and CommandBuffer implement this interface, allowing systems to operate on either without knowing which one they are using.
Type Parameters
Section titled “Type Parameters”ECS_TYPE— the store type parameter
Methods
Section titled “Methods”@Nullable<T extends Component<ECS_TYPE>> T getComponent(@Nonnull Ref<ECS_TYPE> ref, @Nonnull ComponentType<ECS_TYPE, T> componentType)@Nonnull<T extends Component<ECS_TYPE>> T ensureAndGetComponent(@Nonnull Ref<ECS_TYPE> ref, @Nonnull ComponentType<ECS_TYPE, T> componentType)@NonnullArchetype<ECS_TYPE> getArchetype(@Nonnull Ref<ECS_TYPE> ref)@Nonnull<T extends Resource<ECS_TYPE>> T getResource(@Nonnull ResourceType<ECS_TYPE, T> resourceType)@NonnullECS_TYPE getExternalData()<T extends Component<ECS_TYPE>> void putComponent(@Nonnull Ref<ECS_TYPE> ref, @Nonnull ComponentType<ECS_TYPE, T> componentType, @Nonnull T component)<T extends Component<ECS_TYPE>> void addComponent(@Nonnull Ref<ECS_TYPE> ref, @Nonnull ComponentType<ECS_TYPE, T> componentType, @Nonnull T component)<T extends Component<ECS_TYPE>> T addComponent(@Nonnull Ref<ECS_TYPE> ref, @Nonnull ComponentType<ECS_TYPE, T> componentType)Ref<ECS_TYPE>[] addEntities(@Nonnull Holder<ECS_TYPE>[] holders, @Nonnull AddReason reason)@NullableRef<ECS_TYPE> addEntity(@Nonnull Holder<ECS_TYPE> holder, @Nonnull AddReason reason)@NonnullHolder<ECS_TYPE> removeEntity(@Nonnull Ref<ECS_TYPE> ref, @Nonnull Holder<ECS_TYPE> target, @Nonnull RemoveReason reason)<T extends Component<ECS_TYPE>> void removeComponent(@Nonnull Ref<ECS_TYPE> ref, @Nonnull ComponentType<ECS_TYPE, T> componentType)<T extends Component<ECS_TYPE>> void tryRemoveComponent(@Nonnull Ref<ECS_TYPE> ref, @Nonnull ComponentType<ECS_TYPE, T> componentType)<Event extends EcsEvent> void invoke(@Nonnull Ref<ECS_TYPE> ref, @Nonnull Event event)Dispatches an entity-scoped ECS event.
<Event extends EcsEvent> void invoke(@Nonnull EntityEventType<ECS_TYPE, Event> systemType, @Nonnull Ref<ECS_TYPE> ref, @Nonnull Event event)Dispatches an entity-scoped event to a specific event type.
<Event extends EcsEvent> void invoke(@Nonnull Event event)Dispatches a world-scoped ECS event.
<Event extends EcsEvent> void invoke(@Nonnull WorldEventType<ECS_TYPE, Event> systemType, @Nonnull Event event)Dispatches a world-scoped event to a specific event type.
Related Types
Section titled “Related Types”- Store — concrete implementation for direct store access
- CommandBuffer — concrete implementation for deferred commands
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.