Class AllyElement
java.lang.Object
com.pixelmonmod.pixelmon.client.gui.widgets.PixelmonWidget
com.pixelmonmod.pixelmon.client.gui.battles.pokemonOverlays.AllyElement
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
-
Constructor Summary
ConstructorsConstructorDescriptionAllyElement(PixelmonClientData ally, net.minecraft.client.gui.screens.Screen parent, ScreenParticleEngine particleEngine) -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawElement(net.minecraft.client.gui.GuiGraphics graphics, float scale) voiddrawSelected(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, float scale) getAlly()protected voidrenderAllyElementBackground(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 voidrenderExp(net.minecraft.client.gui.GuiGraphics graphics) Renders the cyan colored exp bar that appears beneath a Pokémon's HP bar.protected voidrenderHPBarAndCircle(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 floatrenderNameGenderLevel(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 voidSpawns shiny particles in the world during the battle.protected voidrenderSprite(net.minecraft.client.gui.GuiGraphics graphics) Renders the Pokémon's sprite.protected voidrenderStatus(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
-
Constructor Details
-
AllyElement
public AllyElement(PixelmonClientData ally, net.minecraft.client.gui.screens.Screen parent, ScreenParticleEngine particleEngine)
-
-
Method Details
-
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:
drawElementin classPixelmonWidget
-
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.
-