Class PartyEditorBaseScreen

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.pixelmonmod.pixelmon.client.gui.pokemoneditor.PartyEditorBaseScreen
All Implemented Interfaces:
IImportableContainer, 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:
PokemonEditorPartyScreen, TrainerEditorPartyScreen

public abstract class PartyEditorBaseScreen extends net.minecraft.client.gui.screens.Screen implements 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
    The Pokémon in the party.

    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
    Modifier
    Constructor
    Description
    protected
    Initializes the GUI.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    actionPerformed(net.minecraft.client.gui.components.Button button)
     
    protected abstract void
    addPokemon(int partySlot)
    Adds a new Pokémon to a certain party slot.
    boolean
    charTyped(char key, int par2)
     
    protected abstract void
    editPokemon(int partySlot)
    Edits the Pokémon in a certain party slot.
    static void
    editPokemonPacket(int partySlot)
    Triggers the edit Pokémon screen from a packet.
    protected abstract void
    Navigates back to the previous screen.
    Gets exportable text for the current Pokémon.
     
    net.minecraft.client.gui.screens.Screen
    Returns the screen containing the import/export.
    abstract net.minecraft.network.chat.Component
    Gets the displayed title of the screen.
    importText(String importText)
    Parses import text and saves it to the current Pokémon.
    void
     
    boolean
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    boolean
    mouseReleased(double mouseX, double mouseY, int button)
     
    void
     
    protected abstract void
    Randomizes the party Pokémon.
    void
    render(net.minecraft.client.gui.GuiGraphics matrix, int mouseX, int mouseY, float partialTicks)
     
    void
    renderBackground(net.minecraft.client.gui.GuiGraphics p_283688_, int p_299421_, int p_298679_, float p_297268_)
     
    void
    setPokemon(Pokemon... pokemon)
    Sets the pokemon that was imported
    protected abstract void
     
    protected abstract 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, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, narrationEnabled, onFilesDrop, openLink, rebuildWidgets, removed, removeWidget, 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

    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

    • pokemonList

      public List<Pokemon> pokemonList
      The Pokémon in the party.
  • Constructor Details

    • PartyEditorBaseScreen

      protected PartyEditorBaseScreen(List<Pokemon> pokemonList)
      Initializes the GUI.
      Parameters:
      pokemonList - The Pokémon in the party.
  • Method Details

    • init

      public void init()
      Overrides:
      init in class net.minecraft.client.gui.screens.Screen
    • 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
    • render

      public void render(net.minecraft.client.gui.GuiGraphics matrix, 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
    • renderBackground

      public void renderBackground(net.minecraft.client.gui.GuiGraphics p_283688_, int p_299421_, int p_298679_, float p_297268_)
      Overrides:
      renderBackground in class net.minecraft.client.gui.screens.Screen
    • getTitle

      public abstract net.minecraft.network.chat.Component getTitle()
      Gets the displayed title of the screen.
      Overrides:
      getTitle in class net.minecraft.client.gui.screens.Screen
      Returns:
      The displayed title of the screen.
    • charTyped

      public boolean charTyped(char key, int par2)
      Specified by:
      charTyped in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      charTyped in interface net.minecraft.client.gui.components.events.GuiEventListener
    • actionPerformed

      protected void actionPerformed(net.minecraft.client.gui.components.Button button)
    • exitScreen

      protected abstract void exitScreen()
      Navigates back to the previous screen.
    • randomizeParty

      protected abstract void randomizeParty()
      Randomizes the party Pokémon.
    • addPokemon

      protected abstract void addPokemon(int partySlot)
      Adds a new Pokémon to a certain party slot.
      Parameters:
      partySlot - The party slot to add a Pokémon to.
    • editPokemon

      protected abstract void editPokemon(int partySlot)
      Edits the Pokémon in a certain party slot.
      Parameters:
      partySlot - The party slot of the Pokémon to edit.
    • 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.
    • 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.
    • 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
    • getPokemon

      public Pokemon[] getPokemon()
      Specified by:
      getPokemon in interface IImportableContainer
    • 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 abstract void updatePokemon(Pokemon pokemon)
    • updatePokemon

      protected abstract 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