Class PixelmonSpawnerEvent.Pre
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent
com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent.Pre
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
PixelmonSpawnerEvent
public static class PixelmonSpawnerEvent.Pre
extends PixelmonSpawnerEvent
implements net.neoforged.bus.api.ICancellableEvent
This is the pre-pixelmon spawn event fired before the entity is spawned and before the Pokemon is created
from the specification
Cancelling this will prevent the entity from being spawned
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent
PixelmonSpawnerEvent.Post, PixelmonSpawnerEvent.Pre -
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent
spawner, spawnPosition, spec -
Constructor Summary
ConstructorsConstructorDescriptionPre(PixelmonSpawnerTileEntity spawner, PokemonSpecification spec, net.minecraft.core.BlockPos spawnPosition) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetSpawnPosition(net.minecraft.core.BlockPos spawnPosition) Sets the spawn position of the pokemon about to spawnvoidsetSpec(PokemonSpecification spec) Sets the specification of the pokemon about to spawnMethods inherited from class com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent
getLevel, getSpawner, getSpawnerPosition, getSpawnerState, getSpawnPosition, getSpecMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Constructor Details
-
Pre
public Pre(PixelmonSpawnerTileEntity spawner, PokemonSpecification spec, net.minecraft.core.BlockPos spawnPosition)
-
-
Method Details
-
setSpec
Sets the specification of the pokemon about to spawn- Parameters:
spec- The new specification
-
setSpawnPosition
public void setSpawnPosition(net.minecraft.core.BlockPos spawnPosition) Sets the spawn position of the pokemon about to spawn- Parameters:
spawnPosition- The new specification
-