Class HiddenPowerCalculateEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.HiddenPowerCalculateEvent
public class HiddenPowerCalculateEvent
extends net.minecraftforge.eventbus.api.Event
Called when the hidden power is being calculated by a given source
This cannot be cancelled
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The known causesNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ConstructorDescriptionHiddenPowerCalculateEvent
(String cause, Pokemon pokemon, Element calculatedValue) Initial constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the battle wrapper for the pokemon if they're in battleGets the calculated hidden powergetCause()
Gets the causenet.minecraft.world.entity.player.Player
Gets the player that triggered the calculationGets the Pokemon being calculated forboolean
Checks if the cause was something inside the Pixelmon mod - if false it means it was a plugin or someone made a mistake :))void
setCalculatedValue
(Element calculatedValue) Sets the new calculated valueMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
HiddenPowerCalculateEvent
Initial constructor- Parameters:
cause
- The cause of the eventpokemon
- The pokemon being calculated forcalculatedValue
- The calculated element
-
-
Method Details
-
getCause
Gets the cause- Returns:
- The cause
-
getPokemon
Gets the Pokemon being calculated for- Returns:
- The pokemon
-
getPlayer
public net.minecraft.world.entity.player.Player getPlayer()Gets the player that triggered the calculation- Returns:
- The player
-
isInternal
public boolean isInternal()Checks if the cause was something inside the Pixelmon mod - if false it means it was a plugin or someone made a mistake :))- Returns:
- True if from pixelmon
-
getCalculatedValue
Gets the calculated hidden power- Returns:
- The hidden power
-
setCalculatedValue
Sets the new calculated value- Parameters:
calculatedValue
- The new calculated value
-
getBattlePokemon
Gets the battle wrapper for the pokemon if they're in battle- Returns:
- The battle wrapper
-