Class TitleScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class TitleScreen extends Screen
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • TITLE

      private static final Component TITLE
    • DEMO_LEVEL_ID

      private static final String DEMO_LEVEL_ID
      See Also:
    • splash

      private @Nullable SplashRenderer splash
    • realmsNotificationsScreen

      private @Nullable RealmsNotificationsScreen realmsNotificationsScreen
      A screen generated by realms for notifications drawn in addition to the main menu (buttons and such from both are drawn at the same time). May be null.
    • fading

      private boolean fading
    • fadeInStart

      private long fadeInStart
    • logoRenderer

      private final LogoRenderer logoRenderer
  • Constructor Details

    • TitleScreen

      public TitleScreen()
    • TitleScreen

      public TitleScreen(boolean fading)
    • TitleScreen

      public TitleScreen(boolean fading, @Nullable LogoRenderer logoRenderer)
  • Method Details

    • realmsNotificationsEnabled

      private boolean realmsNotificationsEnabled()
    • tick

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

      public static void registerTextures(TextureManager textureManager)
    • isPauseScreen

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class Screen
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
      Overrides:
      shouldCloseOnEsc in class Screen
    • init

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

      private int createTestWorldButton(int topPos, int spacing)
    • createNormalMenuOptions

      private int createNormalMenuOptions(int topPos, int spacing)
    • getMultiplayerDisabledReason

      private @Nullable Component getMultiplayerDisabledReason()
    • createDemoMenuOptions

      private int createDemoMenuOptions(int topPos, int spacing)
    • checkDemoWorldPresence

      private boolean checkDemoWorldPresence()
    • render

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

      public void renderBackground(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Overrides:
      renderBackground in class Screen
    • mouseClicked

      public boolean mouseClicked(MouseButtonEvent event, boolean doubleClick)
    • removed

      public void removed()
      Overrides:
      removed in class Screen
    • added

      public void added()
      Overrides:
      added in class Screen
    • confirmDemo

      private void confirmDemo(boolean result)
    • canInterruptWithAnotherScreen

      public boolean canInterruptWithAnotherScreen()
      Overrides:
      canInterruptWithAnotherScreen in class Screen