Class PokeCheckerScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.pixelmonmod.pixelmon.client.gui.pokechecker.PokeCheckerScreen
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler,net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.Renderable,net.minecraft.client.gui.components.TabOrderedElement
- Direct Known Subclasses:
PokeCheckerMovesScreen,PokeCheckerRibbonsScreen,PokeCheckerStatsScreen,PokeCheckerTMsScreen
public class PokeCheckerScreen
extends net.minecraft.client.gui.screens.Screen
PokéChecker summary screen.
TODO HAPPYZ: Remake. Also make it like you can give the pokémon list to navigate instead of implying it's the party and not working for anything else.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intstatic final Color[]protected final intprotected final intprotected final intprotected intStarting X position for the Gui.protected intStarting Y position for the Gui.protected final intprotected final intprotected net.minecraft.client.gui.screens.Screenprotected Pokemonprotected StoragePositionprotected PokemonStorageprotected final intprotected final intprotected final intprotected intThe X size of the inventory window in pixels.protected intThe Y size of the inventory window in pixels.Fields inherited from class net.minecraft.client.gui.screens.Screen
children, CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsModifierConstructorDescriptionPokeCheckerScreen(PokemonStorage storage, StoragePosition position, net.minecraft.client.gui.screens.Screen parent) protectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(net.minecraft.client.gui.components.Button button) voidarrowsMouseClicked(double mouseX, double mouseY) Displays to the next or previous Pokémon in the player's party when an arrow button is clicked.booleancharTyped(char typedChar, int keyCode) protected voiddrawAbilityInfo(net.minecraft.client.gui.GuiGraphics graphics) Draws all of the text for a Pokémon's ability.voiddrawArrows(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) Draws the arrow buttons used to cycle through the player's party.protected voiddrawBasePokemonInfo(net.minecraft.client.gui.GuiGraphics graphics) Draws the top-left of the screen, with info that is displayed in all PokéChecker screens.protected voiddrawDynamaxLevel(net.minecraft.client.gui.GuiGraphics graphics) Draws up to 10 differently coloredparallelogramsto represent a Pokémon's Dynamax level.protected voiddrawExperienceBarText(net.minecraft.client.gui.GuiGraphics graphics) Draws the text that appears inside the EXP bar.voiddrawGuiContainerBackgroundLayer(net.minecraft.client.gui.GuiGraphics graphics, float partialTicks, int mouseX, int mouseY) voiddrawGuiContainerForegroundLayer(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) Draws all the text for a Pokémon's Pokédex number, level, hp, status, experience, experience to level up, Dynamax level, and ability.voiddrawHealthBar(net.minecraft.client.gui.GuiGraphics matrix, int x, int y, int width, int height, Pokemon pokemon) Draws a Pokémon's health bar.protected voiddrawNumberLevelAndHPText(net.minecraft.client.gui.GuiGraphics graphics) Draws the text for a Pokémon's Pokédex number, their level, and the text inside the HP bar.protected voiddrawPokemonName(net.minecraft.client.gui.GuiGraphics graphics) Draws the name and nickname of the Pokémon.protected voiddrawTeraType(net.minecraft.client.gui.GuiGraphics graphics) Draws the text and the icon of a Pokémon's Tera Type.voidinit()booleanbooleanmouseClicked(double mouseX, double mouseY, int mouseButton) voidonClose()voidrender(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) voidrenderBackground(net.minecraft.client.gui.GuiGraphics p_283688_, int p_299421_, int p_298679_, float p_297268_) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, createArrowEvent, createTabEvent, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
DYNAMAX_LEVELS
-
HP_BAR_MIDPOINT
protected final int HP_BAR_MIDPOINT- See Also:
-
HP_BAR_TEXT_Y_POS
protected final int HP_BAR_TEXT_Y_POS- See Also:
-
EXP_BAR_TEXT_Y_POS
protected final int EXP_BAR_TEXT_Y_POS- See Also:
-
DYNAMAX_TERA_TEXT_MIDPOINT
protected final int DYNAMAX_TERA_TEXT_MIDPOINT- See Also:
-
DYNAMAX_LEVEL_TEXT_Y
protected final int DYNAMAX_LEVEL_TEXT_Y- See Also:
-
DYNAMAX_PARALLELOGRAM_Y
protected final int DYNAMAX_PARALLELOGRAM_Y- See Also:
-
TERA_TYPE_TEXT_Y
protected final int TERA_TYPE_TEXT_Y- See Also:
-
TERA_TYPE_TEXT_ICON_PADDING
protected final int TERA_TYPE_TEXT_ICON_PADDING- See Also:
-
TERA_TYPE_SIZE
protected final int TERA_TYPE_SIZE- See Also:
-
xSize
protected int xSizeThe X size of the inventory window in pixels. -
ySize
protected int ySizeThe Y size of the inventory window in pixels. -
guiLeft
protected int guiLeftStarting X position for the Gui. Inconsistent use for Gui backgrounds. -
guiTop
protected int guiTopStarting Y position for the Gui. Inconsistent use for Gui backgrounds. -
storage
-
position
-
pokemon
-
parent
@Nullable protected net.minecraft.client.gui.screens.Screen parent
-
-
Constructor Details
-
PokeCheckerScreen
public PokeCheckerScreen(PokemonStorage storage, StoragePosition position, @Nullable net.minecraft.client.gui.screens.Screen parent) -
PokeCheckerScreen
Copy constructor.
-
-
Method Details
-
init
public void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
actionPerformed
public void actionPerformed(net.minecraft.client.gui.components.Button button) -
renderBackground
public void renderBackground(net.minecraft.client.gui.GuiGraphics p_283688_, int p_299421_, int p_298679_, float p_297268_) - Overrides:
renderBackgroundin classnet.minecraft.client.gui.screens.Screen
-
charTyped
public boolean charTyped(char typedChar, int keyCode) -
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) -
render
public void render(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) - Specified by:
renderin interfacenet.minecraft.client.gui.components.Renderable- Overrides:
renderin classnet.minecraft.client.gui.screens.Screen
-
drawGuiContainerForegroundLayer
public void drawGuiContainerForegroundLayer(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) Draws all the text for a Pokémon's Pokédex number, level, hp, status, experience, experience to level up, Dynamax level, and ability. Also draws the parallelograms for the Dynamax level.The last thing it does is call
drawBasePokemonInfo(GuiGraphics).- Parameters:
graphics- The rendering API.mouseX- The cursor's x coordinate.mouseY- The cursor's y coordinate.
-
drawNumberLevelAndHPText
protected void drawNumberLevelAndHPText(net.minecraft.client.gui.GuiGraphics graphics) Draws the text for a Pokémon's Pokédex number, their level, and the text inside the HP bar.- Parameters:
graphics- The rendering API.
-
drawExperienceBarText
protected void drawExperienceBarText(net.minecraft.client.gui.GuiGraphics graphics) Draws the text that appears inside the EXP bar. Formatted as "currentExpToNextLevel/totalExpToNextLevel"Pokémon at max level display the total amount of experience they've gained
Eggs display their experience as "???/???"
- Parameters:
graphics- The rendering API.
-
drawDynamaxLevel
protected void drawDynamaxLevel(net.minecraft.client.gui.GuiGraphics graphics) Draws up to 10 differently coloredparallelogramsto represent a Pokémon's Dynamax level.- Parameters:
graphics- The rendering API.
-
drawTeraType
protected void drawTeraType(net.minecraft.client.gui.GuiGraphics graphics) Draws the text and the icon of a Pokémon's Tera Type.- Parameters:
graphics- The rendering API.
-
drawAbilityInfo
protected void drawAbilityInfo(net.minecraft.client.gui.GuiGraphics graphics) Draws all of the text for a Pokémon's ability.- Parameters:
graphics- The rendering API.
-
drawBasePokemonInfo
protected void drawBasePokemonInfo(net.minecraft.client.gui.GuiGraphics graphics) Draws the top-left of the screen, with info that is displayed in all PokéChecker screens. -
drawGuiContainerBackgroundLayer
public void drawGuiContainerBackgroundLayer(net.minecraft.client.gui.GuiGraphics graphics, float partialTicks, int mouseX, int mouseY) -
drawPokemonName
protected void drawPokemonName(net.minecraft.client.gui.GuiGraphics graphics) Draws the name and nickname of the Pokémon. -
arrowsMouseClicked
public void arrowsMouseClicked(double mouseX, double mouseY) Displays to the next or previous Pokémon in the player's party when an arrow button is clicked.- Parameters:
mouseX- The mouseX coordinate of the cursor.mouseY- The mouseY coordinate of the cursor.
-
drawArrows
public void drawArrows(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) Draws the arrow buttons used to cycle through the player's party.- Parameters:
mouseX- The x coordinate of the cursor.mouseY- The y coordinate of the cursor.
-
drawHealthBar
public void drawHealthBar(net.minecraft.client.gui.GuiGraphics matrix, int x, int y, int width, int height, Pokemon pokemon) Draws a Pokémon's health bar.- Parameters:
x- The x coordinate of the left side of the health bar.y- The y coordinate of the top of the health bar.width- The width of the health bar.height- The height of the health bar.pokemon- The Pokémon to draw a health bar for.
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classnet.minecraft.client.gui.screens.Screen
-