Class BookScreen
java.lang.Object
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.ingame.BookScreen
- All Implemented Interfaces:
Drawable,Element,Navigable,ParentElement
- Direct Known Subclasses:
LecternScreen
- Mappings:
Namespace Name intermediary net/minecraft/class_3872official evlnamed net/minecraft/client/gui/screen/ingame/BookScreen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classstatic classNested classes/interfaces inherited from class net.minecraft.client.gui.screen.Screen
Screen.SelectedElementNarrationData -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Identifierprivate List<OrderedText>private intprivate BookScreen.Contentsstatic final BookScreen.Contentsstatic final intstatic final intstatic final intprotected static final intprotected static final intprotected static final intprivate PageTurnWidgetprivate intprivate Textprivate final booleanprivate PageTurnWidgetprotected static final intFields inherited from class net.minecraft.client.gui.screen.Screen
client, height, OPTIONS_BACKGROUND_TEXTURE, textRenderer, title, widthFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
ConstructorsModifierConstructorDescriptionBookScreen(BookScreen.Contents pageProvider) privateBookScreen(BookScreen.Contents contents, boolean playPageTurnSound) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidstatic voidfilterPages(NbtCompound nbt, Consumer<String> pageConsumer) private intgetTextStyleAt(double x, double y) protected voidprotected voidbooleanhandleTextClick(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.booleanmouseClicked(double mouseX, double mouseY, int button) Callback for when a mouse button down event has been captured.readPages(NbtCompound nbt) voidrender(DrawContext context, int mouseX, int mouseY, float delta) booleansetPage(int index) voidsetPageProvider(BookScreen.Contents pageProvider) private voidMethods inherited from class net.minecraft.client.gui.screen.Screen
addDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, applyNarratorModeChangeDelay, children, clearAndInit, clearChildren, close, filesDragged, findSelectedElementData, getMusic, getNarratedTitle, getNavigationFocus, getTitle, getTooltipFromItem, hasAltDown, hasControlDown, hasShiftDown, hasUsageText, hide, init, initTabNavigation, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrateScreenIfNarrationEnabled, onDisplayed, remove, removed, renderBackground, renderBackgroundTexture, renderWithTooltip, resize, setInitialFocus, setTooltip, setTooltip, setTooltip, setTooltip, shouldCloseOnEsc, shouldPause, switchFocus, tick, updateNarrator, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods 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.navigation.Navigable
getNavigationOrderMethods inherited from interface net.minecraft.client.gui.ParentElement
charTyped, focusOn, getFocusedPath, getNavigationPath, hoveredElement, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setFocused
-
Field Details
-
field_32328
public static final int field_32328- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_32328Lnet/minecraft/class_3872;field_32328:Iofficial aLevl;a:Inamed field_32328Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32328:I
-
field_32329
public static final int field_32329- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_32329Lnet/minecraft/class_3872;field_32329:Iofficial bLevl;b:Inamed field_32329Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32329:I
-
field_32330
public static final int field_32330- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_32330Lnet/minecraft/class_3872;field_32330:Iofficial cLevl;c:Inamed field_32330Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32330:I
-
EMPTY_PROVIDER
- Mappings:
Namespace Name Mixin selector intermediary field_17417Lnet/minecraft/class_3872;field_17417:Lnet/minecraft/class_3872$class_3931;official jLevl;j:Levl$a;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 intermediary field_17117Lnet/minecraft/class_3872;field_17117:Lnet/minecraft/class_2960;official kLevl;k:Lacq;named BOOK_TEXTURELnet/minecraft/client/gui/screen/ingame/BookScreen;BOOK_TEXTURE:Lnet/minecraft/util/Identifier;
-
MAX_TEXT_WIDTH
protected static final int MAX_TEXT_WIDTH- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_32331Lnet/minecraft/class_3872;field_32331:Iofficial lLevl;l:Inamed MAX_TEXT_WIDTHLnet/minecraft/client/gui/screen/ingame/BookScreen;MAX_TEXT_WIDTH:I
-
MAX_TEXT_HEIGHT
protected static final int MAX_TEXT_HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_32332Lnet/minecraft/class_3872;field_32332:Iofficial mLevl;m:Inamed MAX_TEXT_HEIGHTLnet/minecraft/client/gui/screen/ingame/BookScreen;MAX_TEXT_HEIGHT:I
-
WIDTH
protected static final int WIDTH- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_32333Lnet/minecraft/class_3872;field_32333:Iofficial nLevl;n:Inamed WIDTHLnet/minecraft/client/gui/screen/ingame/BookScreen;WIDTH:I
-
HEIGHT
protected static final int HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_32334Lnet/minecraft/class_3872;field_32334:Iofficial oLevl;o:Inamed HEIGHTLnet/minecraft/client/gui/screen/ingame/BookScreen;HEIGHT:I
-
contents
- Mappings:
Namespace Name Mixin selector intermediary field_17418Lnet/minecraft/class_3872;field_17418:Lnet/minecraft/class_3872$class_3931;official pLevl;p:Levl$a;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 intermediary field_17119Lnet/minecraft/class_3872;field_17119:Iofficial qLevl;q:Inamed pageIndexLnet/minecraft/client/gui/screen/ingame/BookScreen;pageIndex:I
-
cachedPage
- Mappings:
Namespace Name Mixin selector intermediary field_17120Lnet/minecraft/class_3872;field_17120:Ljava/util/List;official rLevl;r:Ljava/util/List;named cachedPageLnet/minecraft/client/gui/screen/ingame/BookScreen;cachedPage:Ljava/util/List;
-
cachedPageIndex
private int cachedPageIndex- Mappings:
Namespace Name Mixin selector intermediary field_17121Lnet/minecraft/class_3872;field_17121:Iofficial sLevl;s:Inamed cachedPageIndexLnet/minecraft/client/gui/screen/ingame/BookScreen;cachedPageIndex:I
-
pageIndexText
- Mappings:
Namespace Name Mixin selector intermediary field_25897Lnet/minecraft/class_3872;field_25897:Lnet/minecraft/class_2561;official tLevl;t:Lsw;named pageIndexTextLnet/minecraft/client/gui/screen/ingame/BookScreen;pageIndexText:Lnet/minecraft/text/Text;
-
nextPageButton
- Mappings:
Namespace Name Mixin selector intermediary field_17122Lnet/minecraft/class_3872;field_17122:Lnet/minecraft/class_474;official uLevl;u:Lewl;named nextPageButtonLnet/minecraft/client/gui/screen/ingame/BookScreen;nextPageButton:Lnet/minecraft/client/gui/widget/PageTurnWidget;
-
previousPageButton
- Mappings:
Namespace Name Mixin selector intermediary field_17123Lnet/minecraft/class_3872;field_17123:Lnet/minecraft/class_474;official vLevl;v:Lewl;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 intermediary field_18976Lnet/minecraft/class_3872;field_18976:Zofficial wLevl;w:Znamed pageTurnSoundLnet/minecraft/client/gui/screen/ingame/BookScreen;pageTurnSound:Z
-
-
Constructor Details
-
BookScreen
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_3872;<init>(Lnet/minecraft/class_3872$class_3931;)Vofficial <init>Levl;<init>(Levl$a;)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 intermediary <init>Lnet/minecraft/class_3872;<init>(Lnet/minecraft/class_3872$class_3931;Z)Vofficial <init>Levl;<init>(Levl$a;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 intermediary method_17554Lnet/minecraft/class_3872;method_17554(Lnet/minecraft/class_3872$class_3931;)Vofficial aLevl;a(Levl$a;)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 intermediary method_17556Lnet/minecraft/class_3872;method_17556(I)Zofficial aLevl;a(I)Znamed setPageLnet/minecraft/client/gui/screen/ingame/BookScreen;setPage(I)Z
-
jumpToPage
protected boolean jumpToPage(int page) - Mappings:
Namespace Name Mixin selector intermediary method_17789Lnet/minecraft/class_3872;method_17789(I)Zofficial bLevl;b(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.
This should call
Screen.setInitialFocus(net.minecraft.client.gui.Element)to set the element that is initially focused. -
addCloseButton
protected void addCloseButton()- Mappings:
Namespace Name Mixin selector intermediary method_17557Lnet/minecraft/class_3872;method_17557()Vofficial lLevl;l()Vnamed addCloseButtonLnet/minecraft/client/gui/screen/ingame/BookScreen;addCloseButton()V
-
addPageButtons
protected void addPageButtons()- Mappings:
Namespace Name Mixin selector intermediary method_17558Lnet/minecraft/class_3872;method_17558()Vofficial BLevl;B()Vnamed addPageButtonsLnet/minecraft/client/gui/screen/ingame/BookScreen;addPageButtons()V
-
getPageCount
private int getPageCount()- Mappings:
Namespace Name Mixin selector intermediary method_17055Lnet/minecraft/class_3872;method_17055()Iofficial CLevl;C()Inamed getPageCountLnet/minecraft/client/gui/screen/ingame/BookScreen;getPageCount()I
-
goToPreviousPage
protected void goToPreviousPage()- Mappings:
Namespace Name Mixin selector intermediary method_17057Lnet/minecraft/class_3872;method_17057()Vofficial DLevl;D()Vnamed goToPreviousPageLnet/minecraft/client/gui/screen/ingame/BookScreen;goToPreviousPage()V
-
goToNextPage
protected void goToNextPage()- Mappings:
Namespace Name Mixin selector intermediary method_17058Lnet/minecraft/class_3872;method_17058()Vofficial ELevl;E()Vnamed goToNextPageLnet/minecraft/client/gui/screen/ingame/BookScreen;goToNextPage()V
-
updatePageButtons
private void updatePageButtons()- Mappings:
Namespace Name Mixin selector intermediary method_17059Lnet/minecraft/class_3872;method_17059()Vofficial GLevl;G()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:
- Mappings:
Namespace Name Mixin selector intermediary method_25404Lnet/minecraft/class_364;method_25404(III)Zofficial aLeqk;a(III)Znamed keyPressedLnet/minecraft/client/gui/Element;keyPressed(III)Z
-
render
- Specified by:
renderin interfaceDrawable- Overrides:
renderin classScreen- Mappings:
Namespace Name Mixin selector intermediary method_25394Lnet/minecraft/class_4068;method_25394(Lnet/minecraft/class_332;IIF)Vofficial aLepy;a(Leop;IIF)Vnamed renderLnet/minecraft/client/gui/Drawable;render(Lnet/minecraft/client/gui/DrawContext;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:
- Mappings:
Namespace Name Mixin selector intermediary method_25402Lnet/minecraft/class_364;method_25402(DDI)Zofficial aLeqk;a(DDI)Znamed mouseClickedLnet/minecraft/client/gui/Element;mouseClicked(DDI)Z
-
handleTextClick
- Overrides:
handleTextClickin classScreen- Mappings:
Namespace Name Mixin selector intermediary method_25430Lnet/minecraft/class_437;method_25430(Lnet/minecraft/class_2583;)Zofficial aLeug;a(Lts;)Znamed handleTextClickLnet/minecraft/client/gui/screen/Screen;handleTextClick(Lnet/minecraft/text/Style;)Z
-
closeScreen
protected void closeScreen()- Mappings:
Namespace Name Mixin selector intermediary method_34494Lnet/minecraft/class_3872;method_34494()Vofficial FLevl;F()Vnamed closeScreenLnet/minecraft/client/gui/screen/ingame/BookScreen;closeScreen()V
-
getTextStyleAt
- Mappings:
Namespace Name Mixin selector intermediary method_17048Lnet/minecraft/class_3872;method_17048(DD)Lnet/minecraft/class_2583;official aLevl;a(DD)Lts;named getTextStyleAtLnet/minecraft/client/gui/screen/ingame/BookScreen;getTextStyleAt(DD)Lnet/minecraft/text/Style;
-
readPages
- Mappings:
Namespace Name Mixin selector intermediary method_17555Lnet/minecraft/class_3872;method_17555(Lnet/minecraft/class_2487;)Ljava/util/List;official aLevl;a(Lqr;)Ljava/util/List;named readPagesLnet/minecraft/client/gui/screen/ingame/BookScreen;readPages(Lnet/minecraft/nbt/NbtCompound;)Ljava/util/List;
-
filterPages
- Mappings:
Namespace Name Mixin selector intermediary method_33888Lnet/minecraft/class_3872;method_33888(Lnet/minecraft/class_2487;Ljava/util/function/Consumer;)Vofficial aLevl;a(Lqr;Ljava/util/function/Consumer;)Vnamed filterPagesLnet/minecraft/client/gui/screen/ingame/BookScreen;filterPages(Lnet/minecraft/nbt/NbtCompound;Ljava/util/function/Consumer;)V
-