java.lang.Object
com.pixelmonmod.pixelmon.client.gui.widgets.PixelmonWidget
com.pixelmonmod.pixelmon.client.gui.battles.pokemonOverlays.AllyElement

public class AllyElement extends PixelmonWidget
Renders the element of the Battle UI that represents a Pokémon's Name, Gender, Level, HP, and Sprite, as well as the box or circle elements that contain those pieces of information. Created by Jay113355 on 11/24/2020.
  • Field Summary

    Fields inherited from class com.pixelmonmod.pixelmon.client.gui.widgets.PixelmonWidget

    height, scale, width, x, y, zLevel
  • Constructor Summary

    Constructors
    Constructor
    Description
    AllyElement(PixelmonClientData ally, net.minecraft.client.gui.screens.Screen parent, ScreenParticleEngine particleEngine)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    drawElement(net.minecraft.client.gui.GuiGraphics graphics, float scale)
     
    void
    drawSelected(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, float scale)
     
     
    protected void
    renderAllyElementBackground(net.minecraft.client.gui.GuiGraphics graphics)
    Renders the very dark brown colored background of an ally element that sits behind the name, gender, level, HP bar, and Exp bar.
    protected void
    renderExp(net.minecraft.client.gui.GuiGraphics graphics)
    Renders the cyan colored exp bar that appears beneath a Pokémon's HP bar.
    protected void
    renderHPBarAndCircle(net.minecraft.client.gui.GuiGraphics graphics)
    Renders the green/yellow/red rectangle representing the Pokémon's HP bar, as well as the blue/yellow-orange/red circle around the Pokémon's sprite.
    protected float
    renderNameGenderLevel(net.minecraft.client.gui.GuiGraphics graphics, float offset)
    Renders the image for a Pokémon's gender, and renders the text for a Pokémon's name and level.
    protected void
    Spawns shiny particles in the world during the battle.
    protected void
    renderSprite(net.minecraft.client.gui.GuiGraphics graphics)
    Renders the Pokémon's sprite.
    protected void
    renderStatus(net.minecraft.client.gui.GuiGraphics graphics, float offset)
    Renders the image that represents statuses such as Burn, Poison, Freeze, etc.

    Methods inherited from class com.pixelmonmod.pixelmon.client.gui.widgets.PixelmonWidget

    drawElementScaled, getHeight, getWidth, getX, getY, isMouseOver, setPosition

    Methods inherited from class java.lang.Object

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

  • Method Details

    • getAlly

      public PixelmonClientData getAlly()
    • drawSelected

      public void drawSelected(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, float scale)
    • drawElement

      public void drawElement(net.minecraft.client.gui.GuiGraphics graphics, float scale)
      Specified by:
      drawElement in class PixelmonWidget
    • renderAllyElementBackground

      protected void renderAllyElementBackground(net.minecraft.client.gui.GuiGraphics graphics)
      Renders the very dark brown colored background of an ally element that sits behind the name, gender, level, HP bar, and Exp bar.
      Parameters:
      graphics - The object doing the rendering.
    • renderExp

      protected void renderExp(net.minecraft.client.gui.GuiGraphics graphics)
      Renders the cyan colored exp bar that appears beneath a Pokémon's HP bar.
      Parameters:
      graphics - The object doing the rendering.
    • renderHPBarAndCircle

      protected void renderHPBarAndCircle(net.minecraft.client.gui.GuiGraphics graphics)
      Renders the green/yellow/red rectangle representing the Pokémon's HP bar, as well as the blue/yellow-orange/red circle around the Pokémon's sprite. The colors depend on the Pokémon's % HP.
      Parameters:
      graphics - The object doing the rendering.
    • renderSprite

      protected void renderSprite(net.minecraft.client.gui.GuiGraphics graphics)
      Renders the Pokémon's sprite.
      Parameters:
      graphics - The object doing the rendering.
    • renderNameGenderLevel

      protected float renderNameGenderLevel(net.minecraft.client.gui.GuiGraphics graphics, float offset)
      Renders the image for a Pokémon's gender, and renders the text for a Pokémon's name and level.
      Parameters:
      graphics - The object doing the rendering.
      offset - How much farther to the right a Pokémon's name should be rendered, depending on whether the gender symbol is rendered.
    • renderStatus

      protected void renderStatus(net.minecraft.client.gui.GuiGraphics graphics, float offset)
      Renders the image that represents statuses such as Burn, Poison, Freeze, etc.
      Parameters:
      graphics - The object doing the rendering.
      offset - How much farther to the right a Pokémon's name should be rendered, depending on whether the gender symbol is rendered.
    • renderShinyDetails

      protected void renderShinyDetails()
      Spawns shiny particles in the world during the battle.

      Every frame, there is a 1/80 chance that a Shiny particle will be added to the ScreenParticleEngine, such that the shiny particle renders a block above the shiny Pixelmon's entity.