Class PokemonEditorTeamScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.pixelmonmod.pixelmon.client.gui.pokemoneditor.PokemonEditorTeamScreen
- All Implemented Interfaces:
IImportableContainer,ImportRequestHandler,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
public class PokemonEditorTeamScreen
extends net.minecraft.client.gui.screens.Screen
implements ImportRequestHandler, IImportableContainer
Editor GUI for a Pokémon party.
-
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 TypeFieldDescriptionThe Pokémon in the party.static StringThe name of the player being edited.static UUIDThe UUID of the player being edited.A copy of the Pokémon in the party before being edited.Fields inherited from class net.minecraft.client.gui.screens.Screen
BACKGROUND_LOCATION, children, font, height, minecraft, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionPokemonEditorTeamScreen(List<Pokemon> pokemonList) Initializes the GUI.PokemonEditorTeamScreen(List<Pokemon> uneditedPokemonList, List<Pokemon> editablePokemonList) Initializes the GUI. -
Method Summary
Modifier and TypeMethodDescriptionvoideditPokemonInSinglePokemonEditor(int partySlot) Opens thePokemonEditorIndividualScreento edit the attributes of a single Pokémon.voideditPokemonInSinglePokemonEditor(Pokemon pokemon, int partySlot) Opens thePokemonEditorIndividualScreento edit the attributes of a single Pokémon.static voideditPokemonPacket(int partySlot) Triggers the edit Pokémon screen from a packet.protected voidNavigates back to the previous screen.booleanGets exportable text for the current Pokémon.static StringgetExportText(List<Pokemon> pokemonList, boolean extraColorMode) booleanPokemon[]net.minecraft.client.gui.screens.ScreenReturns the screen containing the import/export.voidhandleResponse(Pokemon... pokemon) voidhandleResponse(String error, String failedValue) importText(String importText) Parses import text and saves it to the current Pokémon.voidinit()booleanbooleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) booleanmouseReleased(double mouseX, double mouseY, int button) voidonClose()voidvoidrender(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) voidrenderDebugAreaOfScreenRectangle(net.minecraft.client.gui.GuiGraphics graphics) voidrenderDraggedRow(net.minecraft.client.gui.GuiGraphics graphics, Pokemon pokemonDragged, int mouseY) voidsetDevEnvDebug(boolean devEnvDebug) voidsetExtraColorMode(boolean extraColorMode) voidsetPokemon(Pokemon... pokemon) Sets the pokemon that was importedprotected voidupdatePokemon(Pokemon pokemon) protected voidupdatePokemon(Pokemon pokemon, int slot) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addEventWidget, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, confirmLink, createArrowEvent, createTabEvent, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, openLink, rebuildWidgets, removed, removeWidget, renderBackground, renderDirtBackground, renderTransparentBackground, renderWithTooltip, repositionElements, resize, runNarration, scheduleNarration, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, shouldRunNarration, suppressNarration, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, 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
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseDragged, 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
-
editedPlayerUUID
The UUID of the player being edited. -
editedPlayerName
The name of the player being edited. -
uneditedPokemonList
A copy of the Pokémon in the party before being edited. -
editablePokemonList
The Pokémon in the party.
-
-
Constructor Details
-
PokemonEditorTeamScreen
Initializes the GUI.- Parameters:
pokemonList- The Pokémon in the party.
-
PokemonEditorTeamScreen
public PokemonEditorTeamScreen(List<Pokemon> uneditedPokemonList, List<Pokemon> editablePokemonList) Initializes the GUI.- Parameters:
uneditedPokemonList- The Pokémon in the party from before they were edited.editablePokemonList- The Pokémon in the party after any edits.
-
-
Method Details
-
init
public void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
reArrangeTabs
public void reArrangeTabs() -
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int button) - Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.Screen
-
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
-
renderDebugAreaOfScreenRectangle
public void renderDebugAreaOfScreenRectangle(net.minecraft.client.gui.GuiGraphics graphics) -
renderDraggedRow
public void renderDraggedRow(net.minecraft.client.gui.GuiGraphics graphics, Pokemon pokemonDragged, int mouseY) -
exitScreen
protected void exitScreen()Navigates back to the previous screen. -
editPokemonPacket
public static void editPokemonPacket(int partySlot) Triggers the edit Pokémon screen from a packet.- Parameters:
partySlot- The party slot of the Pokémon to edit.
-
editPokemonInSinglePokemonEditor
Opens thePokemonEditorIndividualScreento edit the attributes of a single Pokémon.Functionally similar to
PokemonEditorPartyScreenOld#editPokemon(int)- Parameters:
pokemon- The Pokémon to be edited.
-
editPokemonInSinglePokemonEditor
public void editPokemonInSinglePokemonEditor(int partySlot) Opens thePokemonEditorIndividualScreento edit the attributes of a single Pokémon.Functionally similar to
PokemonEditorPartyScreenOld#editPokemon(int)- Parameters:
partySlot- The index of the Pokémon to be edited.
-
getExportText
Description copied from interface:IImportableContainerGets exportable text for the current Pokémon.- Specified by:
getExportTextin interfaceIImportableContainer- Returns:
- Exportable text for the current Pokémon.
-
getExportText
-
setPokemon
Description copied from interface:IImportableContainerSets the pokemon that was imported- Specified by:
setPokemonin interfaceIImportableContainer- Parameters:
pokemon- The pokemon
-
getUneditedPokemonList
-
getEditablePokemonList
-
getPokemon
- Specified by:
getPokemonin interfaceIImportableContainer
-
getDevEnvDebug
public boolean getDevEnvDebug() -
setDevEnvDebug
public void setDevEnvDebug(boolean devEnvDebug) -
getExtraColorMode
public boolean getExtraColorMode() -
setExtraColorMode
public void setExtraColorMode(boolean extraColorMode) -
importText
Description copied from interface:IImportableContainerParses import text and saves it to the current Pokémon.- Specified by:
importTextin interfaceIImportableContainer- Parameters:
importText- The text to save to the current Pokémon.- Returns:
- Null if the import was successful, or an error description if the import failed.
-
updatePokemon
-
updatePokemon
-
getScreen
public net.minecraft.client.gui.screens.Screen getScreen()Description copied from interface:IImportableContainerReturns the screen containing the import/export.- Specified by:
getScreenin interfaceIImportableContainer- Returns:
- The screen containing the import/export.
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-
handleResponse
- Specified by:
handleResponsein interfaceImportRequestHandler
-
handleResponse
- Specified by:
handleResponsein interfaceImportRequestHandler
-