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
Modifier and TypeFieldDescriptionThe Pokémon in the party.static String
The name of the player being edited.static UUID
The 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, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionPokemonEditorTeamScreen
(List<Pokemon> pokemonList) Initializes the GUI.PokemonEditorTeamScreen
(List<Pokemon> uneditedPokemonList, List<Pokemon> editablePokemonList) Initializes the GUI. -
Method Summary
Modifier and TypeMethodDescriptionvoid
editPokemonInSinglePokemonEditor
(int partySlot) Opens thePokemonEditorIndividualScreen
to edit the attributes of a single Pokémon.void
editPokemonInSinglePokemonEditor
(Pokemon pokemon, int partySlot) Opens thePokemonEditorIndividualScreen
to edit the attributes of a single Pokémon.static void
editPokemonPacket
(int partySlot) Triggers the edit Pokémon screen from a packet.protected void
Navigates back to the previous screen.boolean
Gets exportable text for the current Pokémon.static String
getExportText
(List<Pokemon> pokemonList, boolean extraColorMode) boolean
Pokemon[]
net.minecraft.client.gui.screens.Screen
Returns the screen containing the import/export.void
handleResponse
(Pokemon... pokemon) void
handleResponse
(String error, String failedValue) importText
(String importText) Parses import text and saves it to the current Pokémon.void
init()
boolean
boolean
keyPressed
(int keyCode, int scanCode, int modifiers) boolean
mouseClicked
(double mouseX, double mouseY, int button) boolean
mouseReleased
(double mouseX, double mouseY, int button) void
onClose()
void
void
render
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) void
renderDebugAreaOfScreenRectangle
(net.minecraft.client.gui.GuiGraphics graphics) void
renderDraggedRow
(net.minecraft.client.gui.GuiGraphics graphics, Pokemon pokemonDragged, int mouseY) void
setDevEnvDebug
(boolean devEnvDebug) void
setExtraColorMode
(boolean extraColorMode) void
setPokemon
(Pokemon... pokemon) Sets the pokemon that was importedprotected void
updatePokemon
(Pokemon pokemon) protected void
updatePokemon
(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, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseScrolled, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods 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:
init
in classnet.minecraft.client.gui.screens.Screen
-
reArrangeTabs
public void reArrangeTabs() -
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClicked
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
mouseClicked
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int button) - Specified by:
mouseReleased
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
mouseReleased
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressed
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
keyPressed
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
- Overrides:
keyPressed
in classnet.minecraft.client.gui.screens.Screen
-
render
public void render(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) - Specified by:
render
in interfacenet.minecraft.client.gui.components.Renderable
- Overrides:
render
in 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 thePokemonEditorIndividualScreen
to 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 thePokemonEditorIndividualScreen
to 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:IImportableContainer
Gets exportable text for the current Pokémon.- Specified by:
getExportText
in interfaceIImportableContainer
- Returns:
- Exportable text for the current Pokémon.
-
getExportText
-
setPokemon
Description copied from interface:IImportableContainer
Sets the pokemon that was imported- Specified by:
setPokemon
in interfaceIImportableContainer
- Parameters:
pokemon
- The pokemon
-
getUneditedPokemonList
-
getEditablePokemonList
-
getPokemon
- Specified by:
getPokemon
in 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:IImportableContainer
Parses import text and saves it to the current Pokémon.- Specified by:
importText
in 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:IImportableContainer
Returns the screen containing the import/export.- Specified by:
getScreen
in interfaceIImportableContainer
- Returns:
- The screen containing the import/export.
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreen
in classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()- Overrides:
onClose
in classnet.minecraft.client.gui.screens.Screen
-
handleResponse
- Specified by:
handleResponse
in interfaceImportRequestHandler
-
handleResponse
- Specified by:
handleResponse
in interfaceImportRequestHandler
-