Class HiddenPowerCalculateEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.HiddenPowerCalculateEvent
public class HiddenPowerCalculateEvent
extends net.neoforged.bus.api.Event
Called when the hidden power is being calculated by a given source
This cannot be cancelled
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The known causes -
Constructor Summary
ConstructorsConstructorDescriptionHiddenPowerCalculateEvent
(String cause, Pokemon pokemon, net.minecraft.resources.ResourceKey<Type> calculatedValue) Initial constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the battle wrapper for the pokemon if they're in battlenet.minecraft.resources.ResourceKey
<Type> Gets 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
(net.minecraft.resources.ResourceKey<Type> calculatedValue) Sets the new calculated value
-
Constructor Details
-
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
-