public class SpawnerCoordinator
extends java.lang.Object
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.Modifier and Type | Field and Description |
---|---|
static java.util.concurrent.ExecutorService |
PROCESSOR |
java.util.ArrayList<AbstractSpawner> |
spawners |
Constructor and Description |
---|
SpawnerCoordinator(AbstractSpawner... spawners) |
Modifier and Type | Method and Description |
---|---|
SpawnerCoordinator |
activate()
Boots the coordinator, which without overriding involves scheduling the processor and registering on the Forge bus.
|
void |
deactivate()
Deactivates the coordinator by cancelling the processor, clearing the spawners, and unregistering from the Forge bus.
|
boolean |
getActive() |
AbstractSpawner |
getSpawner(java.lang.String name)
Attempts to get the spawner with the given name.
|
void |
onTick(net.minecraftforge.event.TickEvent.ServerTickEvent event) |
public final java.util.ArrayList<AbstractSpawner> spawners
public static java.util.concurrent.ExecutorService PROCESSOR
public SpawnerCoordinator(AbstractSpawner... spawners)
public void onTick(net.minecraftforge.event.TickEvent.ServerTickEvent event)
public boolean getActive()
public SpawnerCoordinator activate()
public void deactivate()
@Nullable public AbstractSpawner getSpawner(java.lang.String name)