Contents
Interface EventCondition.Event<T extends EcsEvent>
- Type Parameters:
T- the ECS event type this condition listens for
- All Superinterfaces:
EventCondition
- All Known Implementing Classes:
EventEndCondition, SignalCondition
- Enclosing interface:
EventCondition
A condition driven by a specific
EcsEvent type rather than polling.
Implementations must also declare a handler class that extends the appropriate block
or entity handler class found in ConditionEventHandler
and registered to the WorldEventsPlugin via the corresponding registration method.
-
Nested Class Summary
Nested classes/interfaces inherited from interface EventCondition
EventCondition.Config, EventCondition.Event<T>, EventCondition.Ticking, EventCondition.TrackedEvent<T>, EventCondition.Type -
Field Summary
Fields inherited from interface EventCondition
ARRAY_CODEC, EMPTY_ARRAY, TYPE_CODEC -
Method Summary
Methods inherited from interface EventCondition
merge, onCancel, onComplete, onStart, reset, test
-
Method Details
-
eventType
-
handle
Processes an incoming ECS event and updates internal state.This is called for every matching event, not only for events that are relevant to this specific condition instance. Implementations must check (e.g. by comparing UUIDs) whether the event is relevant before updating state.
- Parameters:
world- the world in which the event was firedevent- the ECS event
-