Class ExperienceGainEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
com.pixelmonmod.pixelmon.api.events.ExperienceGainEvent
Fired when experience is gained. The experience field can be modified to boost experience. Multiplication of the
experience as opposed to irrelative summation/subtraction is advised.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
battleController
-
Constructor Summary
ConstructorDescriptionExperienceGainEvent
(BattleController controller, PokemonLink pokemon, int experience, ExperienceGainType type) -
Method Summary
Modifier and TypeMethodDescriptionint
Gets how much experience will be given currently.getType()
Gets how the experience has been gained.boolean
void
setExperience
(int experience) Sets the new experience that will be given.Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
getBattleController
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
pokemon
The Pokemon gaining the experience
-
-
Constructor Details
-
ExperienceGainEvent
public ExperienceGainEvent(@Nullable BattleController controller, PokemonLink pokemon, int experience, ExperienceGainType type)
-
-
Method Details
-
isFromBattle
public boolean isFromBattle() -
getExperience
public int getExperience()Gets how much experience will be given currently. -
setExperience
public void setExperience(int experience) Sets the new experience that will be given.- Parameters:
experience
- - The new amount of experience. Negatives will be forced to zero.
-
getType
Gets how the experience has been gained.
-