Class BookScreen

All Implemented Interfaces:
Drawable, Element, Navigable, ParentElement
Direct Known Subclasses:
LecternScreen

@Environment(CLIENT) public class BookScreen extends Screen
Mappings:
Namespace Name
named net/minecraft/client/gui/screen/ingame/BookScreen
intermediary net/minecraft/class_3872
official gts
  • Field Details

    • field_32328

      public static final int field_32328
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_32328 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32328:I
      intermediary field_32328 Lnet/minecraft/class_3872;field_32328:I
      official a Lgts;a:I
    • field_32329

      public static final int field_32329
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_32329 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32329:I
      intermediary field_32329 Lnet/minecraft/class_3872;field_32329:I
      official b Lgts;b:I
    • field_32330

      public static final int field_32330
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_32330 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32330:I
      intermediary field_32330 Lnet/minecraft/class_3872;field_32330:I
      official c Lgts;c:I
    • field_52807

      private static final int field_52807
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_52807 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_52807:I
      intermediary field_52807 Lnet/minecraft/class_3872;field_52807:I
      official w Lgts;w:I
    • field_52808

      private static final int field_52808
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_52808 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_52808:I
      intermediary field_52808 Lnet/minecraft/class_3872;field_52808:I
      official x Lgts;x:I
    • TITLE_TEXT

      private static final Text TITLE_TEXT
      Mappings:
      Namespace Name Mixin selector
      named TITLE_TEXT Lnet/minecraft/client/gui/screen/ingame/BookScreen;TITLE_TEXT:Lnet/minecraft/text/Text;
      intermediary field_60476 Lnet/minecraft/class_3872;field_60476:Lnet/minecraft/class_2561;
      official y Lgts;y:Lyh;
    • STYLE

      private static final Style STYLE
      Mappings:
      Namespace Name Mixin selector
      named STYLE Lnet/minecraft/client/gui/screen/ingame/BookScreen;STYLE:Lnet/minecraft/text/Style;
      intermediary field_63908 Lnet/minecraft/class_3872;field_63908:Lnet/minecraft/class_2583;
      official z Lgts;z:Lzf;
    • EMPTY_PROVIDER

      public static final BookScreen.Contents EMPTY_PROVIDER
      Mappings:
      Namespace Name Mixin selector
      named EMPTY_PROVIDER Lnet/minecraft/client/gui/screen/ingame/BookScreen;EMPTY_PROVIDER:Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;
      intermediary field_17417 Lnet/minecraft/class_3872;field_17417:Lnet/minecraft/class_3872$class_3931;
      official d Lgts;d:Lgts$a;
    • BOOK_TEXTURE

      public static final Identifier BOOK_TEXTURE
      Mappings:
      Namespace Name Mixin selector
      named BOOK_TEXTURE Lnet/minecraft/client/gui/screen/ingame/BookScreen;BOOK_TEXTURE:Lnet/minecraft/util/Identifier;
      intermediary field_17117 Lnet/minecraft/class_3872;field_17117:Lnet/minecraft/class_2960;
      official e Lgts;e:Lamo;
    • MAX_TEXT_WIDTH

      protected static final int MAX_TEXT_WIDTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_TEXT_WIDTH Lnet/minecraft/client/gui/screen/ingame/BookScreen;MAX_TEXT_WIDTH:I
      intermediary field_32331 Lnet/minecraft/class_3872;field_32331:I
      official f Lgts;f:I
    • MAX_TEXT_HEIGHT

      protected static final int MAX_TEXT_HEIGHT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_TEXT_HEIGHT Lnet/minecraft/client/gui/screen/ingame/BookScreen;MAX_TEXT_HEIGHT:I
      intermediary field_32332 Lnet/minecraft/class_3872;field_32332:I
      official t Lgts;t:I
    • WIDTH

      protected static final int WIDTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named WIDTH Lnet/minecraft/client/gui/screen/ingame/BookScreen;WIDTH:I
      intermediary field_32333 Lnet/minecraft/class_3872;field_32333:I
      official u Lgts;u:I
    • field_63904

      private static final int field_63904
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_63904 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_63904:I
      intermediary field_63904 Lnet/minecraft/class_3872;field_63904:I
      official A Lgts;A:I
    • HEIGHT

      protected static final int HEIGHT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named HEIGHT Lnet/minecraft/client/gui/screen/ingame/BookScreen;HEIGHT:I
      intermediary field_32334 Lnet/minecraft/class_3872;field_32334:I
      official v Lgts;v:I
    • field_63905

      private static final int field_63905
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_63905 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_63905:I
      intermediary field_63905 Lnet/minecraft/class_3872;field_63905:I
      official B Lgts;B:I
    • field_63906

      private static final int field_63906
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_63906 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_63906:I
      intermediary field_63906 Lnet/minecraft/class_3872;field_63906:I
      official C Lgts;C:I
    • field_63907

      private static final int field_63907
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_63907 Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_63907:I
      intermediary field_63907 Lnet/minecraft/class_3872;field_63907:I
      official D Lgts;D:I
    • contents

      private BookScreen.Contents contents
      Mappings:
      Namespace Name Mixin selector
      named contents Lnet/minecraft/client/gui/screen/ingame/BookScreen;contents:Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;
      intermediary field_17418 Lnet/minecraft/class_3872;field_17418:Lnet/minecraft/class_3872$class_3931;
      official E Lgts;E:Lgts$a;
    • pageIndex

      private int pageIndex
      Mappings:
      Namespace Name Mixin selector
      named pageIndex Lnet/minecraft/client/gui/screen/ingame/BookScreen;pageIndex:I
      intermediary field_17119 Lnet/minecraft/class_3872;field_17119:I
      official F Lgts;F:I
    • cachedPage

      private List<OrderedText> cachedPage
      Mappings:
      Namespace Name Mixin selector
      named cachedPage Lnet/minecraft/client/gui/screen/ingame/BookScreen;cachedPage:Ljava/util/List;
      intermediary field_17120 Lnet/minecraft/class_3872;field_17120:Ljava/util/List;
      official G Lgts;G:Ljava/util/List;
    • cachedPageIndex

      private int cachedPageIndex
      Mappings:
      Namespace Name Mixin selector
      named cachedPageIndex Lnet/minecraft/client/gui/screen/ingame/BookScreen;cachedPageIndex:I
      intermediary field_17121 Lnet/minecraft/class_3872;field_17121:I
      official H Lgts;H:I
    • pageIndexText

      private Text pageIndexText
      Mappings:
      Namespace Name Mixin selector
      named pageIndexText Lnet/minecraft/client/gui/screen/ingame/BookScreen;pageIndexText:Lnet/minecraft/text/Text;
      intermediary field_25897 Lnet/minecraft/class_3872;field_25897:Lnet/minecraft/class_2561;
      official I Lgts;I:Lyh;
    • nextPageButton

      private PageTurnWidget nextPageButton
      Mappings:
      Namespace Name Mixin selector
      named nextPageButton Lnet/minecraft/client/gui/screen/ingame/BookScreen;nextPageButton:Lnet/minecraft/client/gui/widget/PageTurnWidget;
      intermediary field_17122 Lnet/minecraft/class_3872;field_17122:Lnet/minecraft/class_474;
      official J Lgts;J:Lguu;
    • previousPageButton

      private PageTurnWidget previousPageButton
      Mappings:
      Namespace Name Mixin selector
      named previousPageButton Lnet/minecraft/client/gui/screen/ingame/BookScreen;previousPageButton:Lnet/minecraft/client/gui/widget/PageTurnWidget;
      intermediary field_17123 Lnet/minecraft/class_3872;field_17123:Lnet/minecraft/class_474;
      official K Lgts;K:Lguu;
    • pageTurnSound

      private final boolean pageTurnSound
      Mappings:
      Namespace Name Mixin selector
      named pageTurnSound Lnet/minecraft/client/gui/screen/ingame/BookScreen;pageTurnSound:Z
      intermediary field_18976 Lnet/minecraft/class_3872;field_18976:Z
      official L Lgts;L:Z
  • Constructor Details

    • BookScreen

      public BookScreen(BookScreen.Contents pageProvider)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/gui/screen/ingame/BookScreen;<init>(Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;)V
      intermediary <init> Lnet/minecraft/class_3872;<init>(Lnet/minecraft/class_3872$class_3931;)V
      official <init> Lgts;<init>(Lgts$a;)V
    • BookScreen

      public BookScreen()
    • BookScreen

      private BookScreen(BookScreen.Contents contents, boolean playPageTurnSound)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/gui/screen/ingame/BookScreen;<init>(Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;Z)V
      intermediary <init> Lnet/minecraft/class_3872;<init>(Lnet/minecraft/class_3872$class_3931;Z)V
      official <init> Lgts;<init>(Lgts$a;Z)V
  • Method Details

    • setPageProvider

      public void setPageProvider(BookScreen.Contents pageProvider)
      Mappings:
      Namespace Name Mixin selector
      named setPageProvider Lnet/minecraft/client/gui/screen/ingame/BookScreen;setPageProvider(Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;)V
      intermediary method_17554 Lnet/minecraft/class_3872;method_17554(Lnet/minecraft/class_3872$class_3931;)V
      official a Lgts;a(Lgts$a;)V
    • setPage

      public boolean setPage(int index)
      Mappings:
      Namespace Name Mixin selector
      named setPage Lnet/minecraft/client/gui/screen/ingame/BookScreen;setPage(I)Z
      intermediary method_17556 Lnet/minecraft/class_3872;method_17556(I)Z
      official a Lgts;a(I)Z
    • jumpToPage

      protected boolean jumpToPage(int page)
      Mappings:
      Namespace Name Mixin selector
      named jumpToPage Lnet/minecraft/client/gui/screen/ingame/BookScreen;jumpToPage(I)Z
      intermediary method_17789 Lnet/minecraft/class_3872;method_17789(I)Z
      official b Lgts;b(I)Z
    • init

      protected void init()
      Called when a screen should be initialized.

      This method is called when this screen is opened or resized.

      Overrides:
      init in class Screen
      Mappings:
      Namespace Name Mixin selector
      named init Lnet/minecraft/client/gui/screen/Screen;init()V
      intermediary method_25426 Lnet/minecraft/class_437;method_25426()V
      official bg_ Lgsb;bg_()V
    • getNarratedTitle

      public Text getNarratedTitle()
      Overrides:
      getNarratedTitle in class Screen
      Mappings:
      Namespace Name Mixin selector
      named getNarratedTitle Lnet/minecraft/client/gui/screen/Screen;getNarratedTitle()Lnet/minecraft/text/Text;
      intermediary method_25435 Lnet/minecraft/class_437;method_25435()Lnet/minecraft/class_2561;
      official i Lgsb;i()Lyh;
    • getPageIndicatorText

      private Text getPageIndicatorText()
      Mappings:
      Namespace Name Mixin selector
      named getPageIndicatorText Lnet/minecraft/client/gui/screen/ingame/BookScreen;getPageIndicatorText()Lnet/minecraft/text/Text;
      intermediary method_71545 Lnet/minecraft/class_3872;method_71545()Lnet/minecraft/class_2561;
      official F Lgts;F()Lyh;
    • addCloseButton

      protected void addCloseButton()
      Mappings:
      Namespace Name Mixin selector
      named addCloseButton Lnet/minecraft/client/gui/screen/ingame/BookScreen;addCloseButton()V
      intermediary method_17557 Lnet/minecraft/class_3872;method_17557()V
      official o Lgts;o()V
    • addPageButtons

      protected void addPageButtons()
      Mappings:
      Namespace Name Mixin selector
      named addPageButtons Lnet/minecraft/client/gui/screen/ingame/BookScreen;addPageButtons()V
      intermediary method_17558 Lnet/minecraft/class_3872;method_17558()V
      official p Lgts;p()V
    • getPageCount

      private int getPageCount()
      Mappings:
      Namespace Name Mixin selector
      named getPageCount Lnet/minecraft/client/gui/screen/ingame/BookScreen;getPageCount()I
      intermediary method_17055 Lnet/minecraft/class_3872;method_17055()I
      official M Lgts;M()I
    • goToPreviousPage

      protected void goToPreviousPage()
      Mappings:
      Namespace Name Mixin selector
      named goToPreviousPage Lnet/minecraft/client/gui/screen/ingame/BookScreen;goToPreviousPage()V
      intermediary method_17057 Lnet/minecraft/class_3872;method_17057()V
      official I Lgts;I()V
    • goToNextPage

      protected void goToNextPage()
      Mappings:
      Namespace Name Mixin selector
      named goToNextPage Lnet/minecraft/client/gui/screen/ingame/BookScreen;goToNextPage()V
      intermediary method_17058 Lnet/minecraft/class_3872;method_17058()V
      official J Lgts;J()V
    • updatePageButtons

      private void updatePageButtons()
      Mappings:
      Namespace Name Mixin selector
      named updatePageButtons Lnet/minecraft/client/gui/screen/ingame/BookScreen;updatePageButtons()V
      intermediary method_17059 Lnet/minecraft/class_3872;method_17059()V
      official N Lgts;N()V
    • keyPressed

      public boolean keyPressed(KeyInput input)
      Callback for when a key down event has been captured. The key code is identified by the constants in GLFW class.
      Specified by:
      keyPressed in interface Element
      Specified by:
      keyPressed in interface ParentElement
      Overrides:
      keyPressed in class Screen
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named keyPressed Lnet/minecraft/client/gui/Element;keyPressed(Lnet/minecraft/client/input/KeyInput;)Z
      intermediary method_25404 Lnet/minecraft/class_364;method_25404(Lnet/minecraft/class_11908;)Z
      official a Lgmm;a(Lgzb;)Z
    • render

      public void render(DrawContext context, int mouseX, int mouseY, float deltaTicks)
      Specified by:
      render in interface Drawable
      Overrides:
      render in class Screen
      Mappings:
      Namespace Name Mixin selector
      named render Lnet/minecraft/client/gui/Drawable;render(Lnet/minecraft/client/gui/DrawContext;IIF)V
      intermediary method_25394 Lnet/minecraft/class_4068;method_25394(Lnet/minecraft/class_332;IIF)V
      official a Lgki;a(Lgir;IIF)V
    • render

      private void render(DrawnTextConsumer drawer, boolean click)
      Mappings:
      Namespace Name Mixin selector
      named render Lnet/minecraft/client/gui/screen/ingame/BookScreen;render(Lnet/minecraft/client/font/DrawnTextConsumer;Z)V
      intermediary method_75835 Lnet/minecraft/class_3872;method_75835(Lnet/minecraft/class_12225;Z)V
      official a Lgts;a(Lgil;Z)V
    • renderBackground

      public void renderBackground(DrawContext context, int mouseX, int mouseY, float deltaTicks)
      Renders the background of this screen.

      If the client is in a world, renders the translucent background gradient. Otherwise renders the background texture.

      Overrides:
      renderBackground in class Screen
      Mappings:
      Namespace Name Mixin selector
      named renderBackground Lnet/minecraft/client/gui/screen/Screen;renderBackground(Lnet/minecraft/client/gui/DrawContext;IIF)V
      intermediary method_25420 Lnet/minecraft/class_437;method_25420(Lnet/minecraft/class_332;IIF)V
      official b Lgsb;b(Lgir;IIF)V
    • getLeft

      private int getLeft()
      Mappings:
      Namespace Name Mixin selector
      named getLeft Lnet/minecraft/client/gui/screen/ingame/BookScreen;getLeft()I
      intermediary method_75833 Lnet/minecraft/class_3872;method_75833()I
      official O Lgts;O()I
    • getTop

      private int getTop()
      Mappings:
      Namespace Name Mixin selector
      named getTop Lnet/minecraft/client/gui/screen/ingame/BookScreen;getTop()I
      intermediary method_75834 Lnet/minecraft/class_3872;method_75834()I
      official P Lgts;P()I
    • getCloseButtonY

      protected int getCloseButtonY()
      Mappings:
      Namespace Name Mixin selector
      named getCloseButtonY Lnet/minecraft/client/gui/screen/ingame/BookScreen;getCloseButtonY()I
      intermediary method_75832 Lnet/minecraft/class_3872;method_75832()I
      official K Lgts;K()I
    • mouseClicked

      public boolean mouseClicked(Click click, boolean doubled)
      Callback for when a mouse button down event has been captured. The button number is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named mouseClicked Lnet/minecraft/client/gui/Element;mouseClicked(Lnet/minecraft/client/gui/Click;Z)Z
      intermediary method_25402 Lnet/minecraft/class_364;method_25402(Lnet/minecraft/class_11909;Z)Z
      official a Lgmm;a(Lgzc;Z)Z
    • handleClickEvent

      protected boolean handleClickEvent(@Nullable ClickEvent clickEvent)
      Mappings:
      Namespace Name Mixin selector
      named handleClickEvent Lnet/minecraft/client/gui/screen/ingame/BookScreen;handleClickEvent(Lnet/minecraft/text/ClickEvent;)Z
      intermediary method_71846 Lnet/minecraft/class_3872;method_71846(Lnet/minecraft/class_2558;)Z
      official a Lgts;a(Lyf;)Z
    • closeScreen

      protected void closeScreen()
      Mappings:
      Namespace Name Mixin selector
      named closeScreen Lnet/minecraft/client/gui/screen/ingame/BookScreen;closeScreen()V
      intermediary method_72151 Lnet/minecraft/class_3872;method_72151()V
      official L Lgts;L()V
    • deferSubtitles

      public boolean deferSubtitles()
      Overrides:
      deferSubtitles in class Screen
      Mappings:
      Namespace Name Mixin selector
      named deferSubtitles Lnet/minecraft/client/gui/screen/Screen;deferSubtitles()Z
      intermediary method_73150 Lnet/minecraft/class_437;method_73150()Z
      official v Lgsb;v()Z