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.
Created by Hiroku
Modifier and Type | Field and Description |
---|---|
static java.util.concurrent.ExecutorService |
PROCESSOR
A simple async worker.
|
java.util.ArrayList<AbstractSpawner> |
spawners
All of the spawners this coordinator is managing.
|
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.fml.common.gameevent.TickEvent.ServerTickEvent event) |
static void |
start() |
public final java.util.ArrayList<AbstractSpawner> spawners
public static java.util.concurrent.ExecutorService PROCESSOR
public SpawnerCoordinator(AbstractSpawner... spawners)
public static void start()
public void onTick(net.minecraftforge.fml.common.gameevent.TickEvent.ServerTickEvent event)
public boolean getActive()
public SpawnerCoordinator activate()
public void deactivate()
@Nullable public AbstractSpawner getSpawner(java.lang.String name)