Class BookViewScreen
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.BookViewScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Widget
- Direct Known Subclasses:
LecternScreen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classstatic classNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PageButtonstatic ResourceLocationprivate BookViewScreen.BookAccessprivate intprivate List<FormattedCharSequence>private intstatic BookViewScreen.BookAccessprivate PageButtonprotected static intprotected static intstatic intstatic intstatic intprivate Componentprivate booleanprotected static intprotected static intFields inherited from class net.minecraft.client.gui.screens.Screen
font, height, itemRenderer, minecraft, passEvents, renderables, title, widthFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION -
Constructor Summary
ConstructorsModifierConstructorDescriptionBookViewScreen(BookViewScreen.BookAccess p_98264_)privateBookViewScreen(BookViewScreen.BookAccess p_98266_, boolean p_98267_) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidprotected booleanforcePage(int p_98295_)getClickedComponentStyleAt(double p_98269_, double p_98270_)private intbooleanhandleComponentClicked(Style p_98293_)protected voidinit()booleankeyPressed(int p_98278_, int p_98279_, int p_98280_)loadPages(CompoundTag p_169695_)static voidloadPages(CompoundTag p_169697_, Consumer<String> p_169698_)booleanmouseClicked(double p_98272_, double p_98273_, int p_98274_)protected voidpageBack()protected voidvoidvoidsetBookAccess(BookViewScreen.BookAccess p_98289_)booleansetPage(int p_98276_)private voidMethods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, removed, removeWidget, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentToolTip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, setInitialFocusMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
-
Field Details
-
PAGE_INDICATOR_TEXT_Y_OFFSET
public static final int PAGE_INDICATOR_TEXT_Y_OFFSET- See Also:
- Constant Field Values
-
PAGE_TEXT_X_OFFSET
public static final int PAGE_TEXT_X_OFFSET- See Also:
- Constant Field Values
-
PAGE_TEXT_Y_OFFSET
public static final int PAGE_TEXT_Y_OFFSET- See Also:
- Constant Field Values
-
EMPTY_ACCESS
-
BOOK_LOCATION
-
TEXT_WIDTH
protected static final int TEXT_WIDTH- See Also:
- Constant Field Values
-
TEXT_HEIGHT
protected static final int TEXT_HEIGHT- See Also:
- Constant Field Values
-
IMAGE_WIDTH
protected static final int IMAGE_WIDTH- See Also:
- Constant Field Values
-
IMAGE_HEIGHT
protected static final int IMAGE_HEIGHT- See Also:
- Constant Field Values
-
bookAccess
-
currentPage
private int currentPage -
cachedPageComponents
-
cachedPage
private int cachedPage -
pageMsg
-
forwardButton
-
backButton
-
playTurnSound
private final boolean playTurnSound
-
-
Constructor Details
-
BookViewScreen
-
BookViewScreen
public BookViewScreen() -
BookViewScreen
-
-
Method Details
-
setBookAccess
-
setPage
public boolean setPage(int p_98276_) -
forcePage
protected boolean forcePage(int p_98295_) -
init
protected void init() -
createMenuControls
protected void createMenuControls() -
createPageControlButtons
protected void createPageControlButtons() -
getNumPages
private int getNumPages() -
pageBack
protected void pageBack() -
pageForward
protected void pageForward() -
updateButtonVisibility
private void updateButtonVisibility() -
keyPressed
public boolean keyPressed(int p_98278_, int p_98279_, int p_98280_)- Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen
-
render
-
mouseClicked
public boolean mouseClicked(double p_98272_, double p_98273_, int p_98274_) -
handleComponentClicked
- Overrides:
handleComponentClickedin classScreen
-
closeScreen
protected void closeScreen() -
getClickedComponentStyleAt
-
loadPages
-
loadPages
-