Class EggHatchEvent

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

public abstract class EggHatchEvent extends net.minecraftforge.eventbus.api.Event
Fires when a Pokémon in a player's party hatches from an egg Note: None of the sub-classes are cancellable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Fired after the hatch is done (and message is sent)
    static class 
    Fired before the egg is going to hatch Using this event you can change the message sent to the player

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EggHatchEvent(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.server.level.ServerPlayer
    Gets the player the egg is hatching for Note: This can be null
    Gets the pokemon that is hatching / just hatched
    Gets the storage the egg is hatching in

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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