Class BookScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.ingame.BookScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,TickableElement
- Direct Known Subclasses:
LecternScreen
@Environment(CLIENT) public class BookScreen extends Screen
- Mappings:
Namespace Name official eagintermediary net/minecraft/class_3872named net/minecraft/client/gui/screen/ingame/BookScreen
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBookScreen.Contentsstatic classBookScreen.WritableBookContentsstatic classBookScreen.WrittenBookContents -
Field Summary
Fields Modifier and Type Field Description static IdentifierBOOK_TEXTUREprivate List<OrderedText>cachedPageprivate intcachedPageIndexprivate BookScreen.Contentscontentsstatic BookScreen.ContentsEMPTY_PROVIDERstatic intfield_32328static intfield_32329static intfield_32330protected static intfield_32331protected static intfield_32332protected static intfield_32333protected static intfield_32334private PageTurnWidgetnextPageButtonprivate intpageIndexprivate TextpageIndexTextprivate booleanpageTurnSoundprivate PageTurnWidgetpreviousPageButtonFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Modifier Constructor Description BookScreen()BookScreen(BookScreen.Contents pageProvider)privateBookScreen(BookScreen.Contents contents, boolean playPageTurnSound) -
Method Summary
Modifier and Type Method Description protected voidaddCloseButton()protected voidaddPageButtons()private intgetPageCount()@Nullable StylegetTextAt(double x, double y)protected voidgoToNextPage()protected voidgoToPreviousPage()booleanhandleTextClick(Style style)protected voidinit()Called when a screen should be initialized.protected booleanjumpToPage(int page)booleankeyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured.static voidmethod_33888(NbtCompound nbt, Consumer<String> consumer)protected voidmethod_34494()booleanmouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured.private static List<String>readPages(NbtCompound nbt)voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)booleansetPage(int index)voidsetPageProvider(BookScreen.Contents pageProvider)private voidupdatePageButtons()Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, removed, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, method_35719, method_35720, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
field_32328
public static final int field_32328- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official aLeag;a:Iintermediary field_32328Lnet/minecraft/class_3872;field_32328:Inamed field_32328Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32328:I
-
field_32329
public static final int field_32329- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official bLeag;b:Iintermediary field_32329Lnet/minecraft/class_3872;field_32329:Inamed field_32329Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32329:I
-
field_32330
public static final int field_32330- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official cLeag;c:Iintermediary field_32330Lnet/minecraft/class_3872;field_32330:Inamed field_32330Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32330:I
-
EMPTY_PROVIDER
- Mappings:
Namespace Name Mixin selector official pLeag;p:Leag$a;intermediary field_17417Lnet/minecraft/class_3872;field_17417:Lnet/minecraft/class_3872$class_3931;named EMPTY_PROVIDERLnet/minecraft/client/gui/screen/ingame/BookScreen;EMPTY_PROVIDER:Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;
-
BOOK_TEXTURE
- Mappings:
Namespace Name Mixin selector official qLeag;q:Lwp;intermediary field_17117Lnet/minecraft/class_3872;field_17117:Lnet/minecraft/class_2960;named BOOK_TEXTURELnet/minecraft/client/gui/screen/ingame/BookScreen;BOOK_TEXTURE:Lnet/minecraft/util/Identifier;
-
field_32331
protected static final int field_32331- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official rLeag;r:Iintermediary field_32331Lnet/minecraft/class_3872;field_32331:Inamed field_32331Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32331:I
-
field_32332
protected static final int field_32332- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official sLeag;s:Iintermediary field_32332Lnet/minecraft/class_3872;field_32332:Inamed field_32332Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32332:I
-
field_32333
protected static final int field_32333- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official tLeag;t:Iintermediary field_32333Lnet/minecraft/class_3872;field_32333:Inamed field_32333Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32333:I
-
field_32334
protected static final int field_32334- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official uLeag;u:Iintermediary field_32334Lnet/minecraft/class_3872;field_32334:Inamed field_32334Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32334:I
-
contents
- Mappings:
Namespace Name Mixin selector official vLeag;v:Leag$a;intermediary field_17418Lnet/minecraft/class_3872;field_17418:Lnet/minecraft/class_3872$class_3931;named contentsLnet/minecraft/client/gui/screen/ingame/BookScreen;contents:Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;
-
pageIndex
private int pageIndex- Mappings:
Namespace Name Mixin selector official wLeag;w:Iintermediary field_17119Lnet/minecraft/class_3872;field_17119:Inamed pageIndexLnet/minecraft/client/gui/screen/ingame/BookScreen;pageIndex:I
-
cachedPage
- Mappings:
Namespace Name Mixin selector official xLeag;x:Ljava/util/List;intermediary field_17120Lnet/minecraft/class_3872;field_17120:Ljava/util/List;named cachedPageLnet/minecraft/client/gui/screen/ingame/BookScreen;cachedPage:Ljava/util/List;
-
cachedPageIndex
private int cachedPageIndex- Mappings:
Namespace Name Mixin selector official yLeag;y:Iintermediary field_17121Lnet/minecraft/class_3872;field_17121:Inamed cachedPageIndexLnet/minecraft/client/gui/screen/ingame/BookScreen;cachedPageIndex:I
-
pageIndexText
- Mappings:
Namespace Name Mixin selector official zLeag;z:Lon;intermediary field_25897Lnet/minecraft/class_3872;field_25897:Lnet/minecraft/class_2561;named pageIndexTextLnet/minecraft/client/gui/screen/ingame/BookScreen;pageIndexText:Lnet/minecraft/text/Text;
-
nextPageButton
- Mappings:
Namespace Name Mixin selector official ALeag;A:Lebe;intermediary field_17122Lnet/minecraft/class_3872;field_17122:Lnet/minecraft/class_474;named nextPageButtonLnet/minecraft/client/gui/screen/ingame/BookScreen;nextPageButton:Lnet/minecraft/client/gui/widget/PageTurnWidget;
-
previousPageButton
- Mappings:
Namespace Name Mixin selector official BLeag;B:Lebe;intermediary field_17123Lnet/minecraft/class_3872;field_17123:Lnet/minecraft/class_474;named previousPageButtonLnet/minecraft/client/gui/screen/ingame/BookScreen;previousPageButton:Lnet/minecraft/client/gui/widget/PageTurnWidget;
-
pageTurnSound
private final boolean pageTurnSound- Mappings:
Namespace Name Mixin selector official CLeag;C:Zintermediary field_18976Lnet/minecraft/class_3872;field_18976:Znamed pageTurnSoundLnet/minecraft/client/gui/screen/ingame/BookScreen;pageTurnSound:Z
-
-
Constructor Details
-
BookScreen
- Mappings:
Namespace Name Mixin selector official <init>Leag;<init>(Leag$a;)Vintermediary <init>Lnet/minecraft/class_3872;<init>(Lnet/minecraft/class_3872$class_3931;)Vnamed <init>Lnet/minecraft/client/gui/screen/ingame/BookScreen;<init>(Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;)V
-
BookScreen
public BookScreen() -
BookScreen
- Mappings:
Namespace Name Mixin selector official <init>Leag;<init>(Leag$a;Z)Vintermediary <init>Lnet/minecraft/class_3872;<init>(Lnet/minecraft/class_3872$class_3931;Z)Vnamed <init>Lnet/minecraft/client/gui/screen/ingame/BookScreen;<init>(Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;Z)V
-
-
Method Details
-
setPageProvider
- Mappings:
Namespace Name Mixin selector official aLeag;a(Leag$a;)Vintermediary method_17554Lnet/minecraft/class_3872;method_17554(Lnet/minecraft/class_3872$class_3931;)Vnamed setPageProviderLnet/minecraft/client/gui/screen/ingame/BookScreen;setPageProvider(Lnet/minecraft/client/gui/screen/ingame/BookScreen$Contents;)V
-
setPage
public boolean setPage(int index)- Mappings:
Namespace Name Mixin selector official aLeag;a(I)Zintermediary method_17556Lnet/minecraft/class_3872;method_17556(I)Znamed setPageLnet/minecraft/client/gui/screen/ingame/BookScreen;setPage(I)Z
-
jumpToPage
protected boolean jumpToPage(int page)- Mappings:
Namespace Name Mixin selector official bLeag;b(I)Zintermediary method_17789Lnet/minecraft/class_3872;method_17789(I)Znamed jumpToPageLnet/minecraft/client/gui/screen/ingame/BookScreen;jumpToPage(I)Z
-
init
protected void init()Called when a screen should be initialized.This method is called when this screen is opened or resized.
-
addCloseButton
protected void addCloseButton()- Mappings:
Namespace Name Mixin selector official iLeag;i()Vintermediary method_17557Lnet/minecraft/class_3872;method_17557()Vnamed addCloseButtonLnet/minecraft/client/gui/screen/ingame/BookScreen;addCloseButton()V
-
addPageButtons
protected void addPageButtons()- Mappings:
Namespace Name Mixin selector official kLeag;k()Vintermediary method_17558Lnet/minecraft/class_3872;method_17558()Vnamed addPageButtonsLnet/minecraft/client/gui/screen/ingame/BookScreen;addPageButtons()V
-
getPageCount
private int getPageCount()- Mappings:
Namespace Name Mixin selector official hLeag;h()Iintermediary method_17055Lnet/minecraft/class_3872;method_17055()Inamed getPageCountLnet/minecraft/client/gui/screen/ingame/BookScreen;getPageCount()I
-
goToPreviousPage
protected void goToPreviousPage()- Mappings:
Namespace Name Mixin selector official lLeag;l()Vintermediary method_17057Lnet/minecraft/class_3872;method_17057()Vnamed goToPreviousPageLnet/minecraft/client/gui/screen/ingame/BookScreen;goToPreviousPage()V
-
goToNextPage
protected void goToNextPage()- Mappings:
Namespace Name Mixin selector official mLeag;m()Vintermediary method_17058Lnet/minecraft/class_3872;method_17058()Vnamed goToNextPageLnet/minecraft/client/gui/screen/ingame/BookScreen;goToNextPage()V
-
updatePageButtons
private void updatePageButtons()- Mappings:
Namespace Name Mixin selector official oLeag;o()Vintermediary method_17059Lnet/minecraft/class_3872;method_17059()Vnamed updatePageButtonsLnet/minecraft/client/gui/screen/ingame/BookScreen;updatePageButtons()V
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Specified by:
keyPressedin interfaceElement- Specified by:
keyPressedin interfaceParentElement- Overrides:
keyPressedin classScreen- Parameters:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
trueto indicate that the event handling is successful/valid- See Also:
Keyboard.onKey(long, int, int, int, int),GLFW.GLFW_KEY_Q,GLFWKeyCallbackI.invoke(long, int, int, int, int)- Mappings:
Namespace Name Mixin selector official aLdwt;a(III)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(III)Znamed keyPressedLnet/minecraft/client/gui/Element;keyPressed(III)Z
-
render
- Specified by:
renderin interfaceDrawable- Overrides:
renderin classScreen- Mappings:
Namespace Name Mixin selector official aLdwq;a(Ldpg;IIF)Vintermediary method_25394Lnet/minecraft/class_4068;method_25394(Lnet/minecraft/class_4587;IIF)Vnamed renderLnet/minecraft/client/gui/Drawable;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured. The button number is identified by the constants inGLFWclass.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto indicate that the event handling is successful/valid- See Also:
Mouse.onMouseButton(long, int, int, int),GLFW.GLFW_MOUSE_BUTTON_1- Mappings:
Namespace Name Mixin selector official aLdwt;a(DDI)Zintermediary method_25402Lnet/minecraft/class_364;method_25402(DDI)Znamed mouseClickedLnet/minecraft/client/gui/Element;mouseClicked(DDI)Z
-
handleTextClick
- Overrides:
handleTextClickin classScreen- Mappings:
Namespace Name Mixin selector official aLdze;a(Lox;)Zintermediary method_25430Lnet/minecraft/class_437;method_25430(Lnet/minecraft/class_2583;)Znamed handleTextClickLnet/minecraft/client/gui/screen/Screen;handleTextClick(Lnet/minecraft/text/Style;)Z
-
method_34494
protected void method_34494()- Mappings:
Namespace Name Mixin selector official nLeag;n()Vintermediary method_34494Lnet/minecraft/class_3872;method_34494()Vnamed method_34494Lnet/minecraft/client/gui/screen/ingame/BookScreen;method_34494()V
-
getTextAt
- Mappings:
Namespace Name Mixin selector official aLeag;a(DD)Lox;intermediary method_17048Lnet/minecraft/class_3872;method_17048(DD)Lnet/minecraft/class_2583;named getTextAtLnet/minecraft/client/gui/screen/ingame/BookScreen;getTextAt(DD)Lnet/minecraft/text/Style;
-
readPages
- Mappings:
Namespace Name Mixin selector official bLeag;b(Lmv;)Ljava/util/List;intermediary method_17555Lnet/minecraft/class_3872;method_17555(Lnet/minecraft/class_2487;)Ljava/util/List;named readPagesLnet/minecraft/client/gui/screen/ingame/BookScreen;readPages(Lnet/minecraft/nbt/NbtCompound;)Ljava/util/List;
-
method_33888
- Mappings:
Namespace Name Mixin selector official aLeag;a(Lmv;Ljava/util/function/Consumer;)Vintermediary method_33888Lnet/minecraft/class_3872;method_33888(Lnet/minecraft/class_2487;Ljava/util/function/Consumer;)Vnamed method_33888Lnet/minecraft/client/gui/screen/ingame/BookScreen;method_33888(Lnet/minecraft/nbt/NbtCompound;Ljava/util/function/Consumer;)V
-