Class TeamSelectPokemonIcon

java.lang.Object
com.pixelmonmod.pixelmon.client.gui.battles.rules.TeamSelectPokemonIcon

public class TeamSelectPokemonIcon extends Object
A team selection icon for a Pokémon.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    The selection order index of the Pokémon.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty icon.
    TeamSelectPokemonIcon(Pokemon pokemon, String disabled)
    Creates an icon.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    drawIcon(net.minecraft.client.gui.GuiGraphics graphics, double mouseX, double mouseY, float zLevel, boolean fullSelected)
    Draws the Pokémon icon.
    boolean
    Checks if the Pokémon is not allowed to be selected for battle.
    boolean
    isMouseOver(double mouseX, double mouseY)
    Checks if the cursor is currently hovering over the icon, and the icon is selectable.
    setPosition(int x, int y)
    Sets the position of the icon on the screen.
    void
    setTickOffset(int tickOffset)
    Sets the tick offset used for UI animation.

    Methods inherited from class java.lang.Object

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

    • selectIndex

      public int selectIndex
      The selection order index of the Pokémon.
  • Constructor Details

    • TeamSelectPokemonIcon

      public TeamSelectPokemonIcon()
      Creates an empty icon.
    • TeamSelectPokemonIcon

      public TeamSelectPokemonIcon(Pokemon pokemon, String disabled)
      Creates an icon.
      Parameters:
      pokemon - Details about the Pokémon to draw in the icon.
      disabled - The reason that the Pokémon cannot be selected. Blank if the Pokémon can be selected.
  • Method Details

    • setPosition

      public TeamSelectPokemonIcon setPosition(int x, int y)
      Sets the position of the icon on the screen.
      Parameters:
      x - The x coordinate of the left side of the icon.
      y - The y coordinate of the top of the icon.
      Returns:
      The icon object.
    • setTickOffset

      public void setTickOffset(int tickOffset)
      Sets the tick offset used for UI animation.
      Parameters:
      tickOffset - The tick offset used for UI animation.
    • drawIcon

      public void drawIcon(net.minecraft.client.gui.GuiGraphics graphics, double mouseX, double mouseY, float zLevel, boolean fullSelected)
      Draws the Pokémon icon.
      Parameters:
      mouseX - The x coordinate of the cursor.
      mouseY - The y coordinate of the cursor.
      zLevel - The z coordinate of the screen.
      fullSelected - Whether the player has selected the maximum number of selectable Pokémon for the battle.
    • isMouseOver

      public boolean isMouseOver(double mouseX, double mouseY)
      Checks if the cursor is currently hovering over the icon, and the icon is selectable.
      Parameters:
      mouseX - The x coordinate of the cursor.
      mouseY - The y coordinate of the cursor.
      Returns:
      Whether the cursor is currently hovering over the icon, and the icon is selectable.
    • isDisabled

      public boolean isDisabled()
      Checks if the Pokémon is not allowed to be selected for battle.
      Returns:
      Whether the Pokémon is not allowed to be selected for battle.