public abstract class VersusScreen
extends net.minecraft.client.gui.screen.Screen
Modifier and Type | Field and Description |
---|---|
protected static int |
GUI_HEIGHT
The height of the GUI.
|
protected static int |
GUI_WIDTH
The width of the GUI.
|
protected boolean |
isNPC
Whether the opponent is an NPC Trainer.
|
protected int |
leftX
The x coordinate of the left of the screen.
|
protected int |
offset1
The animated offset of the left parts of the GUI.
|
protected int |
offset2
The animated offset of the right parts of the GUI.
|
protected int |
opponentPartyX
The x coordinate of the left of the opponent's party.
|
protected int |
opponentPartyY
The y coordinate of the left of the opponent's party.
|
static int |
PARTY_SEPARATOR
The distance of party Poké Balls/Pokémon from each other.
|
protected int |
playerPartyX
The x coordinate of the left of the player's party.
|
protected int |
playerPartyY
The y coordinate of the left of the player's party.
|
protected int |
ticks
Counter to update the screen.
|
protected int |
topY
The y coordinate of the top of the screen.
|
Modifier | Constructor and Description |
---|---|
protected |
VersusScreen()
Initializes a screen.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawEntity(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.entity.LivingEntity entity,
int x,
int y,
boolean isCurrentNPC)
Draws an entity's head on the GUI.
|
protected void |
drawEntity(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.ResourceLocation name,
net.minecraft.util.ResourceLocation frame,
net.minecraft.entity.LivingEntity entity,
java.lang.String entityName,
int tickOffset,
int nameBoxX,
int nameBoxY,
int headX,
int headY,
int frameX,
int frameY,
int holderX,
int holderY,
int nameX,
int nameY,
boolean isCurrentNPC)
Draws the player's side of the screen.
|
protected void |
drawOpponentPokeBalls(int numPokeBalls)
Draws the opponent's party Poké Balls.
|
protected void |
drawPokeBalls(java.lang.String[] pokeBalls,
int startX,
int startY,
int tickOffset)
Draws the player's team Poké Balls.
|
protected abstract net.minecraft.entity.LivingEntity |
getOpponent()
Gets the player's opponent for the battle.
|
void |
init() |
boolean |
isPauseScreen()
Returns true if this GUI should pause the game when it is displayed in single-player
|
void |
render(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY,
float f) |
void |
renderBackground(com.mojang.blaze3d.matrix.MatrixStack matrix,
int v) |
void |
renderDirtBackground(int v) |
void |
tick() |
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, onClose, onFilesDrop, removed, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected int leftX
protected int topY
protected int ticks
protected int offset1
protected int offset2
protected int playerPartyX
protected int playerPartyY
protected int opponentPartyX
protected int opponentPartyY
protected boolean isNPC
protected static final int GUI_WIDTH
protected static final int GUI_HEIGHT
public static final int PARTY_SEPARATOR
public void init()
init
in class net.minecraft.client.gui.screen.Screen
public void renderBackground(com.mojang.blaze3d.matrix.MatrixStack matrix, int v)
renderBackground
in class net.minecraft.client.gui.screen.Screen
public void renderDirtBackground(int v)
renderDirtBackground
in class net.minecraft.client.gui.screen.Screen
public void tick()
tick
in interface net.minecraft.client.gui.screen.IScreen
tick
in class net.minecraft.client.gui.screen.Screen
public void render(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY, float f)
render
in interface net.minecraft.client.gui.IRenderable
render
in class net.minecraft.client.gui.screen.Screen
public boolean isPauseScreen()
isPauseScreen
in class net.minecraft.client.gui.screen.Screen
protected abstract net.minecraft.entity.LivingEntity getOpponent()
protected void drawEntity(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.ResourceLocation name, net.minecraft.util.ResourceLocation frame, net.minecraft.entity.LivingEntity entity, java.lang.String entityName, int tickOffset, int nameBoxX, int nameBoxY, int headX, int headY, int frameX, int frameY, int holderX, int holderY, int nameX, int nameY, boolean isCurrentNPC)
name
- The resource for the name box.frame
- The resource for the head frame.entity
- The entity to draw.entityName
- The name of the entity.tickOffset
- The offset from the center to use for animation.nameBoxX
- The x coordinate of the name box.nameBoxY
- The y coordinate of the name box.headX
- The x coordinate of the player's head.headY
- The y coordinate of the player's head.frameX
- The x coordinate of the player's head frame.frameY
- The y coordinate of the player's head frame.holderX
- The x coordinate of the Poké Ball holder.holderY
- The y coordinate of the Poké Ball holder.nameX
- The x coordinate of the player's name.nameY
- The y coordinate of the player's name.isCurrentNPC
- Whether the entity is an NPC.protected void drawPokeBalls(java.lang.String[] pokeBalls, int startX, int startY, int tickOffset)
pokeBalls
- The indices of the player's Poké Ball types.startX
- The x coordinate of the left side of the first Poké Ball.startY
- The y coordinate of the top of the first Poké Ball.tickOffset
- The offset from the center to use for animation.protected void drawOpponentPokeBalls(int numPokeBalls)
numPokeBalls
- The number of Poké Balls to draw.protected void drawEntity(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.entity.LivingEntity entity, int x, int y, boolean isCurrentNPC)
entity
- The entity to draw.x
- The x coordinate of the head.y
- The y coordinate of the head.