Class SpawnerCoordinator
java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.SpawnerCoordinator
- Direct Known Subclasses:
TrackingSpawnerCoordinator
A coordinator of all spawning. An instance of this or a subclass must be stored
under
PixelmonSpawning.coordinator
. The coordinator will not function until
activate()
is called. Ticking will be automatic as long as it is activated.
It is recommended to simply put an instance of the chosen coordinator implementation
in the PixelmonSpawning field during pre-initialization and letting Pixelmon handle
its booting.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactivate()
Boots the coordinator, which without overriding involves scheduling the processor and registering on the Forge bus.void
Deactivates the coordinator by cancelling the processor, clearing the spawners, and unregistering from the Forge bus.boolean
getSpawner
(String name) Attempts to get the spawner with the given name.void
onTick
(net.minecraftforge.event.TickEvent.ServerTickEvent event)
-
Field Details
-
spawners
-
PROCESSOR
-
-
Constructor Details
-
SpawnerCoordinator
-
-
Method Details
-
onTick
public void onTick(net.minecraftforge.event.TickEvent.ServerTickEvent event) -
getActive
public boolean getActive() -
activate
Boots the coordinator, which without overriding involves scheduling the processor and registering on the Forge bus. -
deactivate
public void deactivate()Deactivates the coordinator by cancelling the processor, clearing the spawners, and unregistering from the Forge bus. -
getSpawner
Attempts to get the spawner with the given name. Returns null if it can't find it.
-