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

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The known causes

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    HiddenPowerCalculateEvent(String cause, Pokemon pokemon, Element calculatedValue)
    Initial constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the battle wrapper for the pokemon if they're in battle
    Gets the calculated hidden power
    Gets the cause
    net.minecraft.world.entity.player.Player
    Gets the player that triggered the calculation
    Gets the Pokemon being calculated for
    boolean
    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 value

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HiddenPowerCalculateEvent

      public HiddenPowerCalculateEvent(String cause, Pokemon pokemon, Element calculatedValue)
      Initial constructor
      Parameters:
      cause - The cause of the event
      pokemon - The pokemon being calculated for
      calculatedValue - The calculated element
  • Method Details

    • getCause

      public String getCause()
      Gets the cause
      Returns:
      The cause
    • getPokemon

      public Pokemon 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

      public Element getCalculatedValue()
      Gets the calculated hidden power
      Returns:
      The hidden power
    • setCalculatedValue

      public void setCalculatedValue(Element calculatedValue)
      Sets the new calculated value
      Parameters:
      calculatedValue - The new calculated value
    • getBattlePokemon

      public Optional<PixelmonWrapper> getBattlePokemon()
      Gets the battle wrapper for the pokemon if they're in battle
      Returns:
      The battle wrapper