Skip to content

TimerSystem

Package: com.hypixel.hytale.server.npc.systems

public class TimerSystem extends SteppableTickingSystem

Ticks all Tickable timers stored in the Timers ECS component. Each timer receives the frame delta time.

public TimerSystem(
@Nonnull ComponentType<EntityStore, Timers> timersComponentType,
@Nonnull Set<Dependency<EntityStore>> dependencies
)

Matches entities with the Timers component.

@Override
public void steppedTick(
float dt,
int index,
@Nonnull ArchetypeChunk<EntityStore> archetypeChunk,
@Nonnull Store<EntityStore> store,
@Nonnull CommandBuffer<EntityStore> commandBuffer
)

Iterates timersComponent.getTimers() and calls timer.tick(dt) on each.

Returns EntityTickingSystem.maybeUseParallel(archetypeChunkSize, taskCount).

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.