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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFriendshipChangedEvent
(Pokemon pokemon, int previousFriendshipAmount, int intendedFriendshipAmount) -
Method Summary
Modifier and TypeMethodDescriptionint
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.int
The amount the Pokémon's Friendship will actually be once the upper (255) and lower (0) bounds on Friendship are taken into account.int
The intended amount for the Pokémon's Friendship.The Pokémon that has had its Friendship increased or decreased.int
The Pokémon's Friendship before it gets changed.
-
Field Details
-
pokemon
-
previousFriendshipAmount
protected int previousFriendshipAmount -
intendedFriendshipAmount
protected int intendedFriendshipAmount
-
-
Constructor Details
-
FriendshipChangedEvent
public FriendshipChangedEvent(Pokemon pokemon, int previousFriendshipAmount, int intendedFriendshipAmount)
-
-
Method Details
-
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.
-