Class PokedexEvent.Pre
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.pokedex.event.PokedexEvent
com.pixelmonmod.pixelmon.api.pokedex.event.PokedexEvent.Pre
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
PokedexEvent
public static class PokedexEvent.Pre
extends PokedexEvent
implements net.neoforged.bus.api.ICancellableEvent
Event fired just before the player's pokedex is updated
Cancelling will mean the pokemon doesn't get modified in their pokedex
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.pokedex.event.PokedexEvent
PokedexEvent.Constants, PokedexEvent.Post, PokedexEvent.Pre -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPre(net.minecraft.resources.ResourceKey<Pokedex> pokedexType, UUID uuid, Pokemon pokemon, PokedexRegistrationStatus oldStatus, PokedexRegistrationStatus newStatus, String cause) -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the cause of the eventvoidsetNewStatus(PokedexRegistrationStatus newStatus) Sets the new status it's transitioning tovoidsetPokemon(Pokemon pokemon) Sets the pokemon the status is being changed forMethods inherited from class com.pixelmonmod.pixelmon.api.pokedex.event.PokedexEvent
getCause, getNewStatus, getOldStatus, getPlayer, getPlayerUUID, getPokedexType, getPokemon, isBeingSeenByPokedexKey, isCausedBy, isCausedByCapture, isCausedByEggHatching, isCausedByEvolution, isCausedByNPCTrade, isCausedByPlayerTrade, isCausedBySidemod, isCausedByStorageMovement, isInternalMethods 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(net.minecraft.resources.ResourceKey<Pokedex> pokedexType, UUID uuid, Pokemon pokemon, PokedexRegistrationStatus oldStatus, PokedexRegistrationStatus newStatus, String cause)
-
-
Method Details
-
setNewStatus
Sets the new status it's transitioning to- Parameters:
newStatus- The new status being set in the Player's pokedex
-
setPokemon
Sets the pokemon the status is being changed for- Parameters:
pokemon- The pokemon
-
setCause
Sets the cause of the event- Parameters:
cause- The cause
-