Class PixelmonSpawnerEvent.Pre
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent
com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent.Pre
- Enclosing class:
- PixelmonSpawnerEvent
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
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.events.spawning.PixelmonSpawnerEvent
spawner, spawnPosition, spec
-
Constructor Summary
ConstructorDescriptionPre
(PixelmonSpawnerTileEntity spawner, PokemonSpecification spec, net.minecraft.core.BlockPos spawnPosition) -
Method Summary
Modifier and TypeMethodDescriptionvoid
setSpawnPosition
(net.minecraft.core.BlockPos spawnPosition) Sets the spawn position of the pokemon about to spawnvoid
setSpec
(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, getSpec
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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
-