public class BattleScreen extends ChattableCameraScreen
| Modifier and Type | Field and Description | 
|---|---|
BattleLogElement | 
battleLog  | 
ClientBattleManager | 
bm
The client-side battle manager. 
 | 
int | 
mouseOverButton
The index of the button that the cursor is over. 
 | 
OverlayBase | 
pokemonOverlay
The Pixelmon overlay accompanying the GUI. 
 | 
boolean | 
showGlobalInfo  | 
chatallowUserInput, mouseDown| Constructor and Description | 
|---|
BattleScreen()
Initializes the GUI and its possible screens. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
actionPerformed(net.minecraft.client.gui.widget.button.Button button)  | 
boolean | 
canSelectTarget(Attack attack)
Checks if a target needs to be selected for the attack. 
 | 
boolean | 
charTyped(char key,
         int keyCode)  | 
static void | 
drawHealthBar(com.mojang.blaze3d.matrix.MatrixStack matrix,
             int x,
             int y,
             int width,
             int height,
             float health,
             int maxHealth)
Draws a Pokémon's health bar. 
 | 
int | 
getGuiHeight()
Gets the height of the battle GUI. 
 | 
int | 
getGuiWidth()
Gets the width of the battle GUI. 
 | 
void | 
init()  | 
boolean | 
isTargeted(java.util.UUID uuid)  | 
boolean | 
keyPressed(int keyCode,
          int scanCode,
          int modifiers)  | 
boolean | 
mouseClicked(double mouseX,
            double mouseY,
            int mouseButton)  | 
void | 
removed()  | 
void | 
render(com.mojang.blaze3d.matrix.MatrixStack matrix,
      int mouseX,
      int mouseY,
      float partialTicks)
Draws the screen and all the components in it. 
 | 
void | 
resize(net.minecraft.client.Minecraft mc,
      int w,
      int h)  | 
void | 
restoreSettingsAndClose()
Closes the battle GUI. 
 | 
static void | 
restoreSettingsAndCloseStatic(ClientBattleManager bm)  | 
void | 
selectScreenImmediate(BattleMode mode)
Changes the current screen immediately, without waiting for a tick
 update. 
 | 
boolean | 
setTargeting(PixelmonClientData pig,
            Attack attack,
            int opponentTarget,
            int userTarget)
Sets the targets of an attack. 
 | 
boolean | 
showTargeting()  | 
void | 
tick()  | 
mouseDragged, mouseMoved, mouseReleased, mouseScrolledgetCamera, isPauseScreen, renderBackground, renderDirtBackgroundaddButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorgetFocused, isDragging, setDragging, setFocusedblit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLinepublic ClientBattleManager bm
public OverlayBase pokemonOverlay
public BattleLogElement battleLog
public boolean showGlobalInfo
public int mouseOverButton
public void init()
init in class ChattableCameraScreenpublic void restoreSettingsAndClose()
public static void restoreSettingsAndCloseStatic(@Nullable
                                                 ClientBattleManager bm)
public void removed()
removed in class ChattableCameraScreenpublic void selectScreenImmediate(BattleMode mode)
mode - The screen to change to.public static void drawHealthBar(com.mojang.blaze3d.matrix.MatrixStack matrix,
                                 int x,
                                 int y,
                                 int width,
                                 int height,
                                 float health,
                                 int maxHealth)
x - The x coordinate of the health bar.y - The y coordinate of the health bar.width - The width of the health bar.height - The height of the health bar.health - The current hp of the Pokémon.maxHealth - The maximum hp of the Pokémon.public boolean keyPressed(int keyCode,
                          int scanCode,
                          int modifiers)
keyPressed in interface net.minecraft.client.gui.IGuiEventListenerkeyPressed in interface net.minecraft.client.gui.INestedGuiEventHandlerkeyPressed in class ChattableCameraScreenpublic boolean charTyped(char key,
                         int keyCode)
charTyped in interface net.minecraft.client.gui.IGuiEventListenercharTyped in interface net.minecraft.client.gui.INestedGuiEventHandlercharTyped in class ChattableCameraScreenpublic boolean mouseClicked(double mouseX,
                            double mouseY,
                            int mouseButton)
mouseClicked in interface net.minecraft.client.gui.IGuiEventListenermouseClicked in interface net.minecraft.client.gui.INestedGuiEventHandlermouseClicked in class ChattableCameraScreenpublic void render(com.mojang.blaze3d.matrix.MatrixStack matrix,
                   int mouseX,
                   int mouseY,
                   float partialTicks)
render in interface net.minecraft.client.gui.IRenderablerender in class ChattableCameraScreenpublic void tick()
tick in interface net.minecraft.client.gui.screen.IScreentick in class ChattableCameraScreenpublic int getGuiWidth()
public int getGuiHeight()
public boolean canSelectTarget(Attack attack)
attack - The attack being selected.public boolean setTargeting(PixelmonClientData pig, Attack attack, int opponentTarget, int userTarget)
attack - The attack to target.opponentTarget - The index of the opponent that the player is targeting, or -1
            if the player is not targeting an opponent.userTarget - The index of the allied Pokémon that the player is targeting,
            or -1 if the player is not targeting an ally.public boolean isTargeted(java.util.UUID uuid)
public boolean showTargeting()
protected void actionPerformed(net.minecraft.client.gui.widget.button.Button button)
public void resize(net.minecraft.client.Minecraft mc,
                   int w,
                   int h)
resize in class net.minecraft.client.gui.screen.Screen