MessageSupportSystem
Package: com.hypixel.hytale.server.npc.systems
public abstract class MessageSupportSystem<T extends MessageSupport> extends SteppableTickingSystemAbstract base for systems that tick NPC message support components. Iterates over each NPCMessage slot in the MessageSupport component, advancing the age of activated non-infinite messages and deactivating them when they expire.
Constructor
Section titled “Constructor”public MessageSupportSystem( @Nonnull ComponentType<EntityStore, T> messageSupportComponentType, @Nonnull Set<Dependency<EntityStore>> dependencies)Tick Logic
Section titled “Tick Logic”@Overridepublic void steppedTick( float dt, int index, @Nonnull ArchetypeChunk<EntityStore> archetypeChunk, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer)For each message slot: if activated and not infinite, ticks the age. If the age exceeds the message lifetime, deactivates the slot.
Parallelism
Section titled “Parallelism”Returns EntityTickingSystem.maybeUseParallel(archetypeChunkSize, taskCount).
Inner Systems
Section titled “Inner Systems”Five concrete subclasses handle different message support component types:
MessageSupportSystem.BeaconSystem
Section titled “MessageSupportSystem.BeaconSystem”public static class BeaconSystem extends MessageSupportSystem<BeaconSupport>Ticks beacon message slots for inter-NPC beacon communication.
MessageSupportSystem.NPCBlockEventSystem
Section titled “MessageSupportSystem.NPCBlockEventSystem”public static class NPCBlockEventSystem extends MessageSupportSystem<NPCBlockEventSupport>Ticks block event messages from NPC sources.
MessageSupportSystem.NPCEntityEventSystem
Section titled “MessageSupportSystem.NPCEntityEventSystem”public static class NPCEntityEventSystem extends MessageSupportSystem<NPCEntityEventSupport>Ticks entity event messages from NPC sources.
MessageSupportSystem.PlayerBlockEventSystem
Section titled “MessageSupportSystem.PlayerBlockEventSystem”public static class PlayerBlockEventSystem extends MessageSupportSystem<PlayerBlockEventSupport>Ticks block event messages from player sources.
MessageSupportSystem.PlayerEntityEventSystem
Section titled “MessageSupportSystem.PlayerEntityEventSystem”public static class PlayerEntityEventSystem extends MessageSupportSystem<PlayerEntityEventSupport>Ticks entity event messages from player sources.
Related Types
Section titled “Related Types”- RoleBuilderSystem — adds the message support components during role construction
- BlackboardSystems — blackboard views that generate the events these systems tick