Class EVGainEvent

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

public class EVGainEvent extends net.neoforged.bus.api.Event
All events relating to when EVs are gained, or are about to be gained, by a Pokémon typically after winning a battle, or knocking out an opponent.
  • Field Details

    • pokemon

      protected final Pokemon pokemon
    • faintedPokemon

      protected final Pokemon faintedPokemon
    • originalEVYields

      protected final EVYields originalEVYields
    • evYields

      protected EVYields evYields
  • Constructor Details

  • Method Details

    • getPokemon

      public Pokemon getPokemon()
      The Pokémon receiving the EVs.
    • getFaintedPokemon

      @Nullable public Pokemon getFaintedPokemon()
      The Pokémon responsible for giving the initial amount of EVs.
    • getOriginalEVYields

      public EVYields getOriginalEVYields()
      The EVs that the Pokémon would receive assuming that they had zero EVs.
    • getEvYields

      public EVYields getEvYields()
      When used via EVGainEvent.DoubleYieldEvent.Pre, returns the EVs that will be doubled. When used via EVGainEvent.DoubleYieldEvent.Post, returns the EVs that have been doubled. When used via EVGainEvent.Pre, returns the original EVs that the Pokémon is expected to gain, along with any modfications made via the EVGainEvent.Pre.setYield(EVYields) function. When used via EVGainEvent.Post, returns the EVs that the Pokémon actually gained after accounting for the max limit on each stat and the max limit of EVs in total.