public abstract class IndividualEditorBaseScreen extends DropDownScreen implements IImportableContainer
Modifier and Type | Field and Description |
---|---|
protected Pokemon |
p |
protected java.util.List<net.minecraft.client.gui.widget.TextFieldWidget> |
textFields
A list of all text fields in the GUI.
|
protected java.lang.String |
titleText |
dropDownManager, guiLeft, guiTop, xSize, ySize
Constructor and Description |
---|
IndividualEditorBaseScreen(Pokemon p,
net.minecraft.util.text.ITextComponent titleText)
Initializes an editing Pokémon screen.
|
Modifier and Type | Method and Description |
---|---|
protected void |
actionPerformed(net.minecraft.client.gui.widget.button.Button button) |
protected abstract void |
changePokemon(Species newPokemon)
Changes the Pokémon into a different Pokémon.
|
boolean |
charTyped(char key,
int keyCode) |
protected boolean |
checkFields()
Checks if inputted fields are valid, then saves them.
|
protected net.minecraft.client.gui.widget.TextFieldWidget |
createExtraTextField()
Creates a text field for extra Pokémon data, like form index.
|
protected abstract void |
deletePokemon()
Deletes the Pokémon from the party.
|
protected void |
drawBackgroundUnderMenus(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY)
Draws the screen background under the drop-down menus.
|
protected void |
drawExtraText(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY,
float partialTicks,
net.minecraft.client.gui.widget.TextFieldWidget textField,
java.lang.String langKey)
Draws the extra text field.
|
java.lang.String |
getExportText()
Gets exportable text for the current Pokémon.
|
int |
getNextAvailablePosition()
Finds the first position in the Pokémon's moveset without a move.
|
abstract java.util.List<Pokemon> |
getPokemonList()
Gets the list of party Pokémon that are being edited.
|
Pokemon |
getPokemonSingle() |
net.minecraft.client.gui.screen.Screen |
getScreen()
Returns the screen containing the import/export.
|
java.lang.String |
importText(java.lang.String importText)
Parses import text and saves it to the current Pokémon.
|
void |
init() |
boolean |
keyPressed(int p_231046_1_,
int p_231046_2_,
int p_231046_3_) |
boolean |
mouseClickedUnderMenus(double x,
double y,
int button)
Handles mouse input when a drop-down menu is not clicked.
|
protected abstract void |
saveAndClose()
Saves the Pokémon's data to the server and closes the GUI.
|
void |
setPokemon(Pokemon pokemon) |
protected boolean |
showDeleteButton()
Checks if the delete Pokémon button should be displayed.
|
addDropDown, disableMenus, drawGuiContainerBackgroundLayer, drawGuiContainerForegroundLayer, isPauseScreen, mouseClicked, mouseDragged, mouseScrolled, removeDropDown, render
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, removed, 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
getPokemon, setPokemon
protected Pokemon p
protected java.lang.String titleText
protected java.util.List<net.minecraft.client.gui.widget.TextFieldWidget> textFields
public IndividualEditorBaseScreen(Pokemon p, net.minecraft.util.text.ITextComponent titleText)
p
- The Pokémon being edited.titleText
- display title of the screen.public void init()
init
in class DropDownScreen
public Pokemon getPokemonSingle()
public void setPokemon(Pokemon pokemon)
protected net.minecraft.client.gui.widget.TextFieldWidget createExtraTextField()
protected boolean showDeleteButton()
protected void drawBackgroundUnderMenus(com.mojang.blaze3d.matrix.MatrixStack matrix, float partialTicks, int mouseX, int mouseY)
DropDownScreen
drawBackgroundUnderMenus
in class DropDownScreen
partialTicks
- The current number of partial ticks.mouseX
- The x coordinate of the mouse.mouseY
- The y coordinate of the mouse.protected void drawExtraText(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY, float partialTicks, net.minecraft.client.gui.widget.TextFieldWidget textField, java.lang.String langKey)
textField
- The text field to draw.langKey
- The lang key of the text to draw beside the text field.public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
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 boolean charTyped(char key, int keyCode)
charTyped
in interface net.minecraft.client.gui.IGuiEventListener
charTyped
in interface net.minecraft.client.gui.INestedGuiEventHandler
public boolean mouseClickedUnderMenus(double x, double y, int button)
DropDownScreen
mouseClickedUnderMenus
in class DropDownScreen
x
- The x coordinate of the mouse.y
- The y coordinate of the mouse.button
- The index of the clicked button.protected void actionPerformed(net.minecraft.client.gui.widget.button.Button button)
protected abstract void changePokemon(Species newPokemon)
newPokemon
- The Pokémon to change this Pokémon into.protected abstract void deletePokemon()
protected abstract void saveAndClose()
protected boolean checkFields()
public int getNextAvailablePosition()
public abstract java.util.List<Pokemon> getPokemonList()
public java.lang.String getExportText()
IImportableContainer
getExportText
in interface IImportableContainer
public java.lang.String importText(java.lang.String importText)
IImportableContainer
importText
in interface IImportableContainer
importText
- The text to save to the current Pokémon.public net.minecraft.client.gui.screen.Screen getScreen()
IImportableContainer
getScreen
in interface IImportableContainer