public class PixelmonSpawnerEvent
extends net.minecraftforge.eventbus.api.Event
Modifier and Type | Class and Description |
---|---|
static class |
PixelmonSpawnerEvent.Post
This is the post-pixelmon spawn event fired after the entity is spawned and after the Pokemon is created
from the specification
This is where you can modify the pokemon/entity that has been spawned
This is not cancellable
|
static class |
PixelmonSpawnerEvent.Pre
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
|
Modifier and Type | Field and Description |
---|---|
protected PixelmonSpawnerTileEntity |
spawner |
protected net.minecraft.util.math.BlockPos |
spawnPosition |
protected PokemonSpecification |
spec |
Constructor and Description |
---|
PixelmonSpawnerEvent(PixelmonSpawnerTileEntity spawner,
PokemonSpecification spec,
net.minecraft.util.math.BlockPos spawnPosition)
The basic constructor for the event
|
Modifier and Type | Method and Description |
---|---|
net.minecraft.world.World |
getLevel()
Gets the level that the pokemon is/will spawn in
|
PixelmonSpawnerTileEntity |
getSpawner()
Gets the spawner tile entity causing the pokemon to spawn
|
net.minecraft.util.math.BlockPos |
getSpawnerPosition()
Gets the block position of the spawner
|
net.minecraft.block.BlockState |
getSpawnerState()
Gets the block state of the spawner
|
net.minecraft.util.math.BlockPos |
getSpawnPosition()
Gets the spawn position of the Pokemon
|
PokemonSpecification |
getSpec()
Gets the specification of the Pokemon spawning
|
protected final PixelmonSpawnerTileEntity spawner
protected PokemonSpecification spec
protected net.minecraft.util.math.BlockPos spawnPosition
public PixelmonSpawnerEvent(PixelmonSpawnerTileEntity spawner, PokemonSpecification spec, net.minecraft.util.math.BlockPos spawnPosition)
spawner
- The relevant tile entityspec
- The specification of the spawned pokemonspawnPosition
- The spawn position of the pokemonpublic PixelmonSpawnerTileEntity getSpawner()
public net.minecraft.util.math.BlockPos getSpawnerPosition()
public net.minecraft.block.BlockState getSpawnerState()
public net.minecraft.world.World getLevel()
public PokemonSpecification getSpec()
public net.minecraft.util.math.BlockPos getSpawnPosition()