Class MysteryBoxEvent.Tick.DoSpawn
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent
com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent.Tick
com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent.Tick.DoSpawn
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
MysteryBoxEvent.Tick
public static class MysteryBoxEvent.Tick.DoSpawn
extends MysteryBoxEvent.Tick
implements net.neoforged.bus.api.ICancellableEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent.Tick
MysteryBoxEvent.Tick.AboutToClose, MysteryBoxEvent.Tick.DoSpawn, MysteryBoxEvent.Tick.Start, MysteryBoxEvent.Tick.TrySpawn
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent
MysteryBoxEvent.Activate, MysteryBoxEvent.ComparatorPower, MysteryBoxEvent.Feed, MysteryBoxEvent.Open, MysteryBoxEvent.Tick
-
Constructor Summary
ConstructorsConstructorDescriptionDoSpawn
(MysteryBoxTileEntity box, net.minecraft.world.level.block.state.BlockState blockState, PixelmonEntity pokemon) Fired immediately before a Mystery Box spawns a Pokémon in the world. -
Method Summary
Modifier and TypeMethodDescriptionThe Pokémon this Mystery Box wants to spawn.Methods inherited from class com.pixelmonmod.pixelmon.api.events.blocks.MysteryBoxEvent
getBlockState, getBox
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
-
Constructor Details
-
DoSpawn
public DoSpawn(MysteryBoxTileEntity box, net.minecraft.world.level.block.state.BlockState blockState, PixelmonEntity pokemon) Fired immediately before a Mystery Box spawns a Pokémon in the world. Cancelable.- Parameters:
box
- The Mystery Box tile entity.blockState
- The block state of this Mystery Box.pokemon
- The Pokémon this Mystery Box wants to spawn.
-
-
Method Details
-
getPokemon
The Pokémon this Mystery Box wants to spawn.- Returns:
- The Pokémon being spawned.
-