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 pLastScreen, long pServerId, boolean pIsMinigame)
  • 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 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.
    • getFramePositionX

      private int getFramePositionX(int pIndex)
    • fetchServerData

      private void fetchServerData(long pServerId)
    • doSwitchOrReset

      public void doSwitchOrReset()
    • downloadWorld

      private void downloadWorld(int pSlotIndex)
    • onClose

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

      private boolean isMinigame()
    • drawSlotFrame

      private void drawSlotFrame(GuiGraphics pGuiGraphics, int pX, int pY, int pMouseX, int pMouseY, boolean pIsActiveNonMinigame, String pText, int pSlotIndex, long pTemplateId, @Nullable String pTemplateImage, boolean pHasTemplateImage)