public class CreateSpawnerEvent
extends net.minecraftforge.eventbus.api.Event
This event should be used to modify the properties of spawners. For example, one could check whether
spawner
is an instance of PlayerTrackingSpawner
, and if it is and it belongs to a
specific player, double the TickingSpawner.capacity
field. This would give the result of a player
having a larger number of Pokémon capable of existing around them at once. As previously mentioned,
these fields are final (unless custom code changes them) at the time of this event firing, so there is
no need to monitor these fields after the changes have been made.
Modifier and Type | Field and Description |
---|---|
AbstractSpawner.SpawnerBuilder<? extends AbstractSpawner> |
builder
The
AbstractSpawner.SpawnerBuilder being used. |
AbstractSpawner |
spawner
The
AbstractSpawner being created. |
Constructor and Description |
---|
CreateSpawnerEvent(AbstractSpawner spawner,
AbstractSpawner.SpawnerBuilder<? extends AbstractSpawner> builder) |
public final AbstractSpawner spawner
AbstractSpawner
being created. The spawner is final, but its properties are not.public final AbstractSpawner.SpawnerBuilder<? extends AbstractSpawner> builder
AbstractSpawner.SpawnerBuilder
being used. Its properties could be modified from here, but shouldn't be needed.public CreateSpawnerEvent(AbstractSpawner spawner, AbstractSpawner.SpawnerBuilder<? extends AbstractSpawner> builder)