Class EggHatchEvent

java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.EggHatchEvent
Direct Known Subclasses:
EggHatchEvent.Post, EggHatchEvent.Pre

public abstract class EggHatchEvent extends net.neoforged.bus.api.Event
Fires when a Pokémon in a player's party hatches from an egg Note: None of the sub-classes are cancellable
  • Constructor Details

    • EggHatchEvent

      protected EggHatchEvent(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon)
  • Method Details

    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
      Gets the player the egg is hatching for Note: This can be null
      Returns:
      The player
    • getStorage

      public PokemonStorage getStorage()
      Gets the storage the egg is hatching in
      Returns:
      The storage
    • getPokemon

      public Pokemon getPokemon()
      Gets the pokemon that is hatching / just hatched
      Returns:
      The pokemon