Class WinScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class WinScreen extends Screen
  • Field Details

    • VIGNETTE_LOCATION

      private static final ResourceLocation VIGNETTE_LOCATION
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • SECTION_HEADING

      private static final Component SECTION_HEADING
    • NAME_PREFIX

      private static final String NAME_PREFIX
      See Also:
    • OBFUSCATE_TOKEN

      private static final String OBFUSCATE_TOKEN
    • SPEEDUP_FACTOR

      private static final float SPEEDUP_FACTOR
      See Also:
    • SPEEDUP_FACTOR_FAST

      private static final float SPEEDUP_FACTOR_FAST
      See Also:
    • END_POEM_LOCATION

      private static final ResourceLocation END_POEM_LOCATION
    • CREDITS_LOCATION

      private static final ResourceLocation CREDITS_LOCATION
    • POSTCREDITS_LOCATION

      private static final ResourceLocation POSTCREDITS_LOCATION
    • poem

      private final boolean poem
    • onFinished

      private final Runnable onFinished
    • scroll

      private float scroll
    • lines

      private List<FormattedCharSequence> lines
    • centeredLines

      private it.unimi.dsi.fastutil.ints.IntSet centeredLines
    • totalScrollLength

      private int totalScrollLength
    • speedupActive

      private boolean speedupActive
    • speedupModifiers

      private final it.unimi.dsi.fastutil.ints.IntSet speedupModifiers
    • scrollSpeed

      private float scrollSpeed
    • unmodifiedScrollSpeed

      private final float unmodifiedScrollSpeed
    • direction

      private int direction
    • logoRenderer

      private final LogoRenderer logoRenderer
  • Constructor Details

    • WinScreen

      public WinScreen(boolean pPoem, Runnable pOnFinished)
  • Method Details

    • calculateScrollSpeed

      private float calculateScrollSpeed()
    • tick

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

      public boolean keyPressed(int p_169469_, int p_169470_, int p_169471_)
      Description copied from interface: ContainerEventHandler
      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:
      p_169469_ - the key code of the pressed key.
      p_169470_ - the scan code of the pressed key.
      p_169471_ - the keyboard modifiers.
      Returns:
      true if the event is consumed, false otherwise.
    • keyReleased

      public boolean keyReleased(int p_169476_, int p_169477_, int p_169478_)
      Description copied from interface: ContainerEventHandler
      Called when a keyboard key is released within the GUI element.

      Parameters:
      p_169476_ - the key code of the released key.
      p_169477_ - the scan code of the released key.
      p_169478_ - the keyboard modifiers.
      Returns:
      true if the event is consumed, false otherwise.
    • onClose

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

      private void respawn()
    • init

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

      private void wrapCreditsIO(ResourceLocation pLocation, WinScreen.CreditsReader pReader)
    • addPoemFile

      private void addPoemFile(Reader pReader) throws IOException
      Throws:
      IOException
    • addCreditsFile

      private void addCreditsFile(Reader pReader)
    • addEmptyLine

      private void addEmptyLine()
    • addPoemLines

      private void addPoemLines(String pText)
    • addCreditsLine

      private void addCreditsLine(Component pCreditsLine, boolean pCentered)
    • render

      public void render(GuiGraphics p_281907_, int p_282364_, int p_282696_, float p_281316_)
      Description copied from class: Screen
      Neo: mixins targeting this method won't fire for container screens as AbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float) replicates this method in place of a super call to insert an event
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      p_281907_ - the GuiGraphics object used for rendering.
      p_282364_ - the x-coordinate of the mouse cursor.
      p_282696_ - the y-coordinate of the mouse cursor.
      p_281316_ - the partial tick time.
    • renderVignette

      private void renderVignette(GuiGraphics pGuiGraphics)
    • renderBackground

      public void renderBackground(GuiGraphics p_282239_, int p_294762_, int p_295473_, float p_296441_)
      Overrides:
      renderBackground in class Screen
    • renderMenuBackground

      protected void renderMenuBackground(GuiGraphics p_333914_, int p_333869_, int p_334014_, int p_333930_, int p_333890_)
      Overrides:
      renderMenuBackground in class Screen
    • isPauseScreen

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

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

      public Music getBackgroundMusic()
      Overrides:
      getBackgroundMusic in class Screen