Class AbstractCommandBlockEditScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
Direct Known Subclasses:
CommandBlockEditScreen, MinecartCommandBlockEditScreen

public abstract class AbstractCommandBlockEditScreen extends Screen
  • Field Details

    • SET_COMMAND_LABEL

      private static final Component SET_COMMAND_LABEL
    • COMMAND_LABEL

      private static final Component COMMAND_LABEL
    • PREVIOUS_OUTPUT_LABEL

      private static final Component PREVIOUS_OUTPUT_LABEL
    • commandEdit

      protected EditBox commandEdit
    • previousEdit

      protected EditBox previousEdit
    • doneButton

      protected Button doneButton
    • cancelButton

      protected Button cancelButton
    • outputButton

      protected CycleButton<Boolean> outputButton
    • commandSuggestions

      CommandSuggestions commandSuggestions
  • Constructor Details

    • AbstractCommandBlockEditScreen

      public AbstractCommandBlockEditScreen()
  • Method Details

    • tick

      public void tick()
      Overrides:
      tick in class Screen
    • getCommandBlock

      abstract BaseCommandBlock getCommandBlock()
    • getPreviousY

      abstract int getPreviousY()
    • init

      protected void init()
      Overrides:
      init in class Screen
    • setInitialFocus

      protected void setInitialFocus()
      Overrides:
      setInitialFocus in class Screen
    • getUsageNarration

      protected Component getUsageNarration()
      Overrides:
      getUsageNarration in class Screen
    • resize

      public void resize(Minecraft pMinecraft, int pWidth, int pHeight)
      Overrides:
      resize in class Screen
    • updatePreviousOutput

      protected void updatePreviousOutput(boolean pTrackOutput)
    • onDone

      protected void onDone()
    • populateAndSendPacket

      protected abstract void populateAndSendPacket(BaseCommandBlock pCommandBlock)
    • onEdited

      private void onEdited(String p_97689_)
    • keyPressed

      public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers)
      Called when a keyboard key is pressed within the GUI element.

      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
      Parameters:
      pKeyCode - the key code of the pressed key.
      pScanCode - the scan code of the pressed key.
      pModifiers - the keyboard modifiers.
      Returns:
      true if the event is consumed, false otherwise.
    • mouseScrolled

      public boolean mouseScrolled(double pMouseX, double pMouseY, double pScrollX, double pScrollY)
    • mouseClicked

      public boolean mouseClicked(double pMouseX, double pMouseY, int pButton)
      Called when a mouse button is clicked within the GUI element.

      Parameters:
      pMouseX - the X coordinate of the mouse.
      pMouseY - the Y coordinate of the mouse.
      pButton - the button that was clicked.
      Returns:
      true if the event is consumed, false otherwise.
    • render

      public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      pGuiGraphics - the GuiGraphics object used for rendering.
      pMouseX - the x-coordinate of the mouse cursor.
      pMouseY - the y-coordinate of the mouse cursor.
      pPartialTick - the partial tick time.
    • renderBackground

      public void renderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
      Overrides:
      renderBackground in class Screen