Class SpawnEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.spawning.SpawnEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class SpawnEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.bus.api.ICancellableEvent
Event fired when an
AbstractSpawner
attempts to perform a SpawnAction
.
Cancelling this event will prevent the Pokémon or NPC or whatever from spawning.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SpawnAction
<? extends net.minecraft.world.entity.Entity> The specific information about the spawn.final AbstractSpawner
TheAbstractSpawner
attempting to do the spawn. -
Constructor Summary
ConstructorsConstructorDescriptionSpawnEvent
(AbstractSpawner spawner, SpawnAction<? extends net.minecraft.world.entity.Entity> action) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
spawner
TheAbstractSpawner
attempting to do the spawn. -
action
The specific information about the spawn.
-
-
Constructor Details
-
SpawnEvent
public SpawnEvent(AbstractSpawner spawner, SpawnAction<? extends net.minecraft.world.entity.Entity> action)
-