Class RealmsBrokenWorldScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class RealmsBrokenWorldScreen extends RealmsScreen
  • Field Details

    • SLOT_FRAME_SPRITE

      private static final ResourceLocation SLOT_FRAME_SPRITE
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • DEFAULT_BUTTON_WIDTH

      private static final int DEFAULT_BUTTON_WIDTH
      See Also:
    • lastScreen

      private final Screen lastScreen
    • serverData

      @Nullable private RealmsServer serverData
    • serverId

      private final long serverId
    • message

      private final Component[] message
    • leftX

      private int leftX
    • slotsThatHasBeenDownloaded

      private final List<Integer> slotsThatHasBeenDownloaded
    • animTick

      private int animTick
  • Constructor Details

    • RealmsBrokenWorldScreen

      public RealmsBrokenWorldScreen(Screen lastScreen, long serverId, boolean isMinigame)
  • Method Details

    • init

      public void init()
      Overrides:
      init in class Screen
    • getNarrationMessage

      public Component getNarrationMessage()
      Overrides:
      getNarrationMessage in class Screen
    • addButtons

      private void addButtons()
    • tick

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

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

      private int getFramePositionX(int index)
    • fetchServerData

      private void fetchServerData(long serverId)
    • doSwitchOrReset

      public void doSwitchOrReset()
    • downloadWorld

      private void downloadWorld(int slotIndex)
    • onClose

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

      private boolean isMinigame()
    • drawSlotFrame

      private void drawSlotFrame(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY, boolean isActiveNonMinigame, String text, int slotIndex, long templateId, @Nullable String templateImage, boolean hasTemplateImage)