Class CreateSpawnerEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.spawning.CreateSpawnerEvent

public class CreateSpawnerEvent extends net.minecraftforge.eventbus.api.Event
Fires when a spawner is built off a preset. Provided custom spawner builders fire the super.apply(T) after all of its applications, this event will fire at the very end of a spawner's construction and therefore any and all changes made during a handle of this event will be final.

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.