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

    Fields
    Modifier and Type
    Field
    Description
    protected List<Pokemon>
    The Pokémon in the party.
    static String
    The name of the player being edited.
    static UUID
    The UUID of the player being edited.
    protected final List<Pokemon>
    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

    Constructors
    Constructor
    Description
    Initializes the GUI.
    PokemonEditorTeamScreen(List<Pokemon> uneditedPokemonList, List<Pokemon> editablePokemonList)
    Initializes the GUI.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Opens the PokemonEditorIndividualScreen to edit the attributes of a single Pokémon.
    void
    editPokemonInSinglePokemonEditor(Pokemon pokemon, int partySlot)
    Opens the PokemonEditorIndividualScreen 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
     
     
    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
     
    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
     
    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 imported
    protected void
     
    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

      public static UUID editedPlayerUUID
      The UUID of the player being edited.
    • editedPlayerName

      public static String editedPlayerName
      The name of the player being edited.
    • uneditedPokemonList

      protected final List<Pokemon> uneditedPokemonList
      A copy of the Pokémon in the party before being edited.
    • editablePokemonList

      protected List<Pokemon> editablePokemonList
      The Pokémon in the party.
  • Constructor Details

    • PokemonEditorTeamScreen

      public PokemonEditorTeamScreen(List<Pokemon> pokemonList)
      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 class net.minecraft.client.gui.screens.Screen
    • reArrangeTabs

      public void reArrangeTabs()
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
    • mouseReleased

      public boolean mouseReleased(double mouseX, double mouseY, int button)
      Specified by:
      mouseReleased in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseReleased in interface net.minecraft.client.gui.components.events.GuiEventListener
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.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 interface net.minecraft.client.gui.components.Renderable
      Overrides:
      render in class net.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

      public void editPokemonInSinglePokemonEditor(Pokemon pokemon, int partySlot)
      Opens the PokemonEditorIndividualScreen 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 the PokemonEditorIndividualScreen 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

      public String getExportText()
      Description copied from interface: IImportableContainer
      Gets exportable text for the current Pokémon.
      Specified by:
      getExportText in interface IImportableContainer
      Returns:
      Exportable text for the current Pokémon.
    • getExportText

      public static String getExportText(List<Pokemon> pokemonList, boolean extraColorMode)
    • setPokemon

      public void setPokemon(Pokemon... pokemon)
      Description copied from interface: IImportableContainer
      Sets the pokemon that was imported
      Specified by:
      setPokemon in interface IImportableContainer
      Parameters:
      pokemon - The pokemon
    • getUneditedPokemonList

      public List<Pokemon> getUneditedPokemonList()
    • getEditablePokemonList

      public List<Pokemon> getEditablePokemonList()
    • getPokemon

      public Pokemon[] getPokemon()
      Specified by:
      getPokemon in interface IImportableContainer
    • getDevEnvDebug

      public boolean getDevEnvDebug()
    • setDevEnvDebug

      public void setDevEnvDebug(boolean devEnvDebug)
    • getExtraColorMode

      public boolean getExtraColorMode()
    • setExtraColorMode

      public void setExtraColorMode(boolean extraColorMode)
    • importText

      public String importText(String importText)
      Description copied from interface: IImportableContainer
      Parses import text and saves it to the current Pokémon.
      Specified by:
      importText in interface IImportableContainer
      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

      protected void updatePokemon(Pokemon pokemon)
    • updatePokemon

      protected void updatePokemon(Pokemon pokemon, int slot)
    • 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 interface IImportableContainer
      Returns:
      The screen containing the import/export.
    • isPauseScreen

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class net.minecraft.client.gui.screens.Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class net.minecraft.client.gui.screens.Screen
    • handleResponse

      public void handleResponse(String error, String failedValue)
      Specified by:
      handleResponse in interface ImportRequestHandler
    • handleResponse

      public void handleResponse(Pokemon... pokemon)
      Specified by:
      handleResponse in interface ImportRequestHandler