public abstract class PokemonScreen extends net.minecraft.client.gui.screen.Screen implements HideMouse
Modifier and Type | Field and Description |
---|---|
protected int |
boxNumber |
protected int |
footerBottom
The locations of the corners of the footer.
|
protected int |
footerLeft
The locations of the corners of the footer.
|
protected int |
footerRight
The locations of the corners of the footer.
|
protected int |
footerTop
The locations of the corners of the footer.
|
protected static int |
PC_NUM_HEIGHT
The number of Pokémon that can fit along the height of the PC GUI.
|
protected static int |
PC_NUM_WIDTH
The number of Pokémon that can fit along the width of the GUI.
|
protected int |
pcBottom
The locations of the corners of the PC.
|
protected int |
pcLeft
The locations of the corners of the PC.
|
protected int |
pcRight
The locations of the corners of the PC.
|
protected int |
pcTop
The locations of the corners of the PC.
|
protected StoragePosition |
selected |
protected Pokemon |
selectedPokemon |
protected static int |
SLOT_HEIGHT
The height of an individual Pokémon slot.
|
protected static int |
SLOT_WIDTH
The width of an individual Pokémon slot.
|
protected PCStorage |
storage |
Constructor and Description |
---|
PokemonScreen(StoragePosition selected)
Initializes the PC GUI at the given position (box) or last position.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawBox(com.mojang.blaze3d.matrix.MatrixStack matrix) |
protected void |
drawCursor(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY) |
protected void |
drawFooter(com.mojang.blaze3d.matrix.MatrixStack matrix) |
protected void |
drawFooterBackground(com.mojang.blaze3d.matrix.MatrixStack matrix) |
protected void |
drawHover(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY) |
protected void |
drawPokeChecker(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY,
float partialTicks)
This explicitly draws the pokéchecker, because even if it's a button, it has to be drawn above some other things.
|
protected Pokemon |
getFooterAt(double x,
double y)
Gets the Pokémon at the specified location in the footer.
|
protected Pokemon |
getFooterAt(int index)
Gets the Pokémon at the specified location in the footer.
|
protected int |
getFooterNumWidth() |
protected StoragePosition |
getFooterPosAt(double x,
double y)
Gets the footer position at the specified location.
|
protected Pokemon |
getPCAt(int x,
int y)
Gets the Pokémon at the specified location in the PC.
|
protected StoragePosition |
getPCPosAt(double x,
double y)
Gets the PC position at the specified location.
|
protected Pokemon |
getPokemon(StoragePosition position) |
StoragePosition |
getPosAt(double x,
double y)
Gets the PC or footer position at the specified location.
|
Pokemon |
getSlotAt(int x,
int y)
Gets the Pokémon at the specified location.
|
protected PokemonStorage |
getStorage(StoragePosition position) |
void |
init() |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int mouseButton) |
void |
removed() |
protected boolean |
tryToSwap(PokemonStorage from,
StoragePosition fromPosition,
PokemonStorage to,
StoragePosition toPosition) |
protected void |
updateSelected(StoragePosition selected) |
protected void |
updateStorage(PCStorage storage,
StoragePosition selected) |
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, render, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, 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 static final int SLOT_WIDTH
protected static final int SLOT_HEIGHT
protected static final int PC_NUM_WIDTH
protected static final int PC_NUM_HEIGHT
protected int pcLeft
protected int pcRight
protected int pcTop
protected int pcBottom
protected PCStorage storage
protected int boxNumber
protected StoragePosition selected
protected Pokemon selectedPokemon
protected int footerLeft
protected int footerRight
protected int footerTop
protected int footerBottom
public PokemonScreen(@Nullable StoragePosition selected)
protected void updateSelected(StoragePosition selected)
protected void updateStorage(PCStorage storage, @Nullable StoragePosition selected)
protected PokemonStorage getStorage(StoragePosition position)
protected Pokemon getPokemon(StoragePosition position)
public void init()
init
in class net.minecraft.client.gui.screen.Screen
protected int getFooterNumWidth()
public Pokemon getSlotAt(int x, int y)
x
- The x coordinate of the location.y
- The y coordinate of the location.public StoragePosition getPosAt(double x, double y)
x
- The x coordinate of the location.y
- The y coordinate of the location.protected StoragePosition getFooterPosAt(double x, double y)
x
- The x coordinate of the location.y
- The y coordinate of the location.protected StoragePosition getPCPosAt(double x, double y)
x
- The x coordinate of the location.y
- The y coordinate of the location.protected Pokemon getFooterAt(double x, double y)
x
- The x coordinate of the location.y
- The y coordinate of the location.protected Pokemon getFooterAt(int index)
index
- The index of the footer location.protected Pokemon getPCAt(int x, int y)
x
- The x coordinate of the location.y
- The y coordinate of the location.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
protected boolean tryToSwap(PokemonStorage from, StoragePosition fromPosition, PokemonStorage to, StoragePosition toPosition)
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 net.minecraft.client.gui.screen.Screen
public void removed()
removed
in class net.minecraft.client.gui.screen.Screen
protected void drawBox(com.mojang.blaze3d.matrix.MatrixStack matrix)
protected void drawFooter(com.mojang.blaze3d.matrix.MatrixStack matrix)
protected void drawFooterBackground(com.mojang.blaze3d.matrix.MatrixStack matrix)
protected void drawPokeChecker(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
protected void drawHover(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY)
protected void drawCursor(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY)