Class EditWorldScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class EditWorldScreen extends Screen
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NAME_LABEL

      private static final Component NAME_LABEL
    • RESET_ICON_BUTTON

      private static final Component RESET_ICON_BUTTON
    • FOLDER_BUTTON

      private static final Component FOLDER_BUTTON
    • BACKUP_BUTTON

      private static final Component BACKUP_BUTTON
    • BACKUP_FOLDER_BUTTON

      private static final Component BACKUP_FOLDER_BUTTON
    • OPTIMIZE_BUTTON

      private static final Component OPTIMIZE_BUTTON
    • OPTIMIZE_TITLE

      private static final Component OPTIMIZE_TITLE
    • OPTIMIIZE_DESCRIPTION

      private static final Component OPTIMIIZE_DESCRIPTION
    • SAVE_BUTTON

      private static final Component SAVE_BUTTON
    • DEFAULT_WIDTH

      private static final int DEFAULT_WIDTH
      See Also:
    • VERTICAL_SPACING

      private static final int VERTICAL_SPACING
      See Also:
    • HALF_WIDTH

      private static final int HALF_WIDTH
      See Also:
    • layout

      private final LinearLayout layout
    • callback

      private final it.unimi.dsi.fastutil.booleans.BooleanConsumer callback
    • levelAccess

      private final LevelStorageSource.LevelStorageAccess levelAccess
    • nameEdit

      private final EditBox nameEdit
  • Constructor Details

  • Method Details

    • create

      public static EditWorldScreen create(Minecraft p_307412_, LevelStorageSource.LevelStorageAccess p_307335_, it.unimi.dsi.fastutil.booleans.BooleanConsumer p_307249_) throws IOException
      Throws:
      IOException
    • setInitialFocus

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

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

      protected void repositionElements()
      Overrides:
      repositionElements in class Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class Screen
    • onRename

      private void onRename(String pSaveName)
    • makeBackupAndShowToast

      public static boolean makeBackupAndShowToast(LevelStorageSource.LevelStorageAccess pLevelAccess)
    • 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.