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 |
chat
allowUserInput, 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, mouseScrolled
getCamera, isPauseScreen, renderBackground, renderDirtBackground
addButton, 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, wrapScreenError
getFocused, isDragging, setDragging, setFocused
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
public ClientBattleManager bm
public OverlayBase pokemonOverlay
public BattleLogElement battleLog
public boolean showGlobalInfo
public int mouseOverButton
public void init()
init
in class ChattableCameraScreen
public void restoreSettingsAndClose()
public static void restoreSettingsAndCloseStatic(@Nullable ClientBattleManager bm)
public void removed()
removed
in class ChattableCameraScreen
public 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.IGuiEventListener
keyPressed
in interface net.minecraft.client.gui.INestedGuiEventHandler
keyPressed
in class ChattableCameraScreen
public boolean charTyped(char key, int keyCode)
charTyped
in interface net.minecraft.client.gui.IGuiEventListener
charTyped
in interface net.minecraft.client.gui.INestedGuiEventHandler
charTyped
in class ChattableCameraScreen
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
mouseClicked
in interface net.minecraft.client.gui.IGuiEventListener
mouseClicked
in interface net.minecraft.client.gui.INestedGuiEventHandler
mouseClicked
in class ChattableCameraScreen
public void render(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
render
in interface net.minecraft.client.gui.IRenderable
render
in class ChattableCameraScreen
public void tick()
tick
in interface net.minecraft.client.gui.screen.IScreen
tick
in class ChattableCameraScreen
public 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