Class TeamSelectPokemonIcon
java.lang.Object
com.pixelmonmod.pixelmon.client.gui.battles.rules.TeamSelectPokemonIcon
A team selection icon for a Pokémon.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates an empty icon.TeamSelectPokemonIcon
(Pokemon pokemon, String disabled) Creates an icon. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Field Details
-
selectIndex
public int selectIndexThe selection order index of the Pokémon.
-
-
Constructor Details
-
TeamSelectPokemonIcon
public TeamSelectPokemonIcon()Creates an empty icon. -
TeamSelectPokemonIcon
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
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.
-