Class FriendshipChangedEvent

java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.pokemon.FriendshipChangedEvent

public class FriendshipChangedEvent extends net.neoforged.bus.api.Event
  • Field Details

    • pokemon

      protected Pokemon pokemon
    • previousFriendshipAmount

      protected int previousFriendshipAmount
    • intendedFriendshipAmount

      protected int intendedFriendshipAmount
  • Constructor Details

    • FriendshipChangedEvent

      public FriendshipChangedEvent(Pokemon pokemon, int previousFriendshipAmount, int intendedFriendshipAmount)
  • Method Details

    • getPokemon

      public Pokemon getPokemon()
      The Pokémon that has had its Friendship increased or decreased.
    • getPreviousFriendshipAmount

      public int getPreviousFriendshipAmount()
      The Pokémon's Friendship before it gets changed.
    • getIntendedFriendshipAmount

      public int getIntendedFriendshipAmount()
      The intended amount for the Pokémon's Friendship. Can be positive or negative.
    • getActualNextFriendshipAmount

      public int getActualNextFriendshipAmount()
      The amount the Pokémon's Friendship will actually be once the upper (255) and lower (0) bounds on Friendship are taken into account.
    • getActualFriendshipChangeAmount

      public int getActualFriendshipChangeAmount()
      The amount the Pokémon's Friendship actually increased or decreased by, once the upper (255) and lower (0) bounds on Friendship are taken into about. Can be positive or negative.