Skip to content

NewSpawnStartTickingSystem

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

public class NewSpawnStartTickingSystem extends TickingSystem<EntityStore>

Removes the NonTicking component from newly spawned NPC entities, enabling them to participate in the tick pipeline. Newly spawned NPCs are initially marked as non-ticking to prevent them from being processed before full initialization completes.

DependencyDirection
StepCleanupSystemAFTER
public static void queueNewSpawn(@Nonnull Ref<EntityStore> reference, @Nonnull Store<EntityStore> store)

Adds the NonTicking component to the entity and enqueues it in the QueueResource for processing in the next tick.

@Override
public void tick(float dt, int systemIndex, @Nonnull Store<EntityStore> store)

Iterates through the queue resource. For each valid reference, removes the NonTicking component. Clears the queue after processing.

public static class QueueResource implements Resource<EntityStore>

ECS resource that holds a queue of references to newly spawned entities awaiting activation. Backed by ObjectArrayList<Ref<EntityStore>>.

@Nonnull
public static ResourceType<EntityStore, NewSpawnStartTickingSystem.QueueResource> getResourceType()

Returns the resource type from NPCPlugin.

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