类 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
-
- 所有已实现的接口:
Drawable,Element,ParentElement,TickableElement
- 直接已知子类:
LecternScreen
@Environment(CLIENT) public class BookScreen extends Screen
- Mappings:
Namespace Name official eaiintermediary net/minecraft/class_3872named net/minecraft/client/gui/screen/ingame/BookScreen
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceBookScreen.Contentsstatic classBookScreen.WritableBookContentsstatic classBookScreen.WrittenBookContents
-
字段概要
字段 修饰符和类型 字段 说明 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 PageTurnWidgetpreviousPageButton-
从类继承的字段 net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
-
从类继承的字段 net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
-
构造器概要
构造器 限定符 构造器 说明 BookScreen()BookScreen(BookScreen.Contents pageProvider)privateBookScreen(BookScreen.Contents contents, boolean playPageTurnSound)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidaddCloseButton()protected voidaddPageButtons()protected voidcloseScreen()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(CompoundTag nbt, Consumer<String> consumer)booleanmouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured.private static List<String>readPages(CompoundTag nbt)voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)booleansetPage(int index)voidsetPageProvider(BookScreen.Contents pageProvider)private voidupdatePageButtons()-
从类继承的方法 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, wrapScreenError
-
从类继承的方法 net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocused
-
从类继承的方法 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, setZOffset
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 net.minecraft.client.gui.Element
mouseMoved
-
从接口继承的方法 net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
字段详细资料
-
field_32328
public static final int field_32328
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official aLeai;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
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official bLeai;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
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official cLeai;c:Iintermediary field_32330Lnet/minecraft/class_3872;field_32330:Inamed field_32330Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32330:I
-
EMPTY_PROVIDER
public static final BookScreen.Contents EMPTY_PROVIDER
- Mappings:
Namespace Name Mixin selector official pLeai;p:Leai$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
public static final Identifier BOOK_TEXTURE
- Mappings:
Namespace Name Mixin selector official qLeai;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
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official rLeai;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
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official sLeai;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
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official tLeai;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
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official uLeai;u:Iintermediary field_32334Lnet/minecraft/class_3872;field_32334:Inamed field_32334Lnet/minecraft/client/gui/screen/ingame/BookScreen;field_32334:I
-
contents
private BookScreen.Contents contents
- Mappings:
Namespace Name Mixin selector official vLeai;v:Leai$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 wLeai;w:Iintermediary field_17119Lnet/minecraft/class_3872;field_17119:Inamed pageIndexLnet/minecraft/client/gui/screen/ingame/BookScreen;pageIndex:I
-
cachedPage
private List<OrderedText> cachedPage
- Mappings:
Namespace Name Mixin selector official xLeai;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 yLeai;y:Iintermediary field_17121Lnet/minecraft/class_3872;field_17121:Inamed cachedPageIndexLnet/minecraft/client/gui/screen/ingame/BookScreen;cachedPageIndex:I
-
pageIndexText
private Text pageIndexText
- Mappings:
Namespace Name Mixin selector official zLeai;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
private PageTurnWidget nextPageButton
- Mappings:
Namespace Name Mixin selector official ALeai;A:Lebg;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
private PageTurnWidget previousPageButton
- Mappings:
Namespace Name Mixin selector official BLeai;B:Lebg;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 CLeai;C:Zintermediary field_18976Lnet/minecraft/class_3872;field_18976:Znamed pageTurnSoundLnet/minecraft/client/gui/screen/ingame/BookScreen;pageTurnSound:Z
-
-
构造器详细资料
-
BookScreen
public BookScreen(BookScreen.Contents pageProvider)
- Mappings:
Namespace Name Mixin selector official <init>Leai;<init>(Leai$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
private BookScreen(BookScreen.Contents contents, boolean playPageTurnSound)
- Mappings:
Namespace Name Mixin selector official <init>Leai;<init>(Leai$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
-
-
方法详细资料
-
setPageProvider
public void setPageProvider(BookScreen.Contents pageProvider)
- Mappings:
Namespace Name Mixin selector official aLeai;a(Leai$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 aLeai;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 bLeai;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 iLeai;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 kLeai;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 hLeai;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 lLeai;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 mLeai;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 oLeai;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.- 指定者:
keyPressed在接口中Element- 指定者:
keyPressed在接口中ParentElement- 覆盖:
keyPressed在类中Screen- 参数:
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)- 返回:
trueto indicate that the event handling is successful/valid- 另请参阅:
Keyboard.onKey(long, int, int, int, int),GLFW.GLFW_KEY_Q,GLFWKeyCallbackI.invoke(long, int, int, int, int)- Mappings:
Namespace Name Mixin selector official aLdwv;a(III)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(III)Znamed keyPressedLnet/minecraft/client/gui/Element;keyPressed(III)Z
-
render
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
- 指定者:
render在接口中Drawable- 覆盖:
render在类中Screen- Mappings:
Namespace Name Mixin selector official aLdws;a(Ldpi;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.- 参数:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- 返回:
trueto indicate that the event handling is successful/valid- 另请参阅:
Mouse.onMouseButton(long, int, int, int),GLFW.GLFW_MOUSE_BUTTON_1- Mappings:
Namespace Name Mixin selector official aLdwv;a(DDI)Zintermediary method_25402Lnet/minecraft/class_364;method_25402(DDI)Znamed mouseClickedLnet/minecraft/client/gui/Element;mouseClicked(DDI)Z
-
handleTextClick
public boolean handleTextClick(Style style)
- 覆盖:
handleTextClick在类中Screen- Mappings:
Namespace Name Mixin selector official aLdzg;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
-
closeScreen
protected void closeScreen()
- Mappings:
Namespace Name Mixin selector official nLeai;n()Vintermediary method_34494Lnet/minecraft/class_3872;method_34494()Vnamed closeScreenLnet/minecraft/client/gui/screen/ingame/BookScreen;closeScreen()V
-
getTextAt
@Nullable public @Nullable Style getTextAt(double x, double y)
- Mappings:
Namespace Name Mixin selector official aLeai;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
private static List<String> readPages(CompoundTag nbt)
- Mappings:
Namespace Name Mixin selector official bLeai;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/CompoundTag;)Ljava/util/List;
-
method_33888
public static void method_33888(CompoundTag nbt, Consumer<String> consumer)
- Mappings:
Namespace Name Mixin selector official aLeai;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/CompoundTag;Ljava/util/function/Consumer;)V
-
-