Class BookViewScreen
java.lang.Object
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,Renderable,TabOrderedElement
- Direct Known Subclasses:
LecternScreen
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PageButtonstatic final ResourceLocationprivate BookViewScreen.BookAccessprivate intprivate List<FormattedCharSequence> private intstatic final BookViewScreen.BookAccessprivate PageButtonprotected static final intprotected static final intstatic final intstatic final intstatic final intprivate Componentprivate final booleanprotected static final intprotected static final intFields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
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_) booleanmouseClicked(double p_98272_, double p_98273_, int p_98274_) protected voidpageBack()protected voidvoidrender(GuiGraphics p_281997_, int p_281262_, int p_283321_, float p_282251_) Neo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)replicates this method in place of a super call to insert an eventvoidrenderBackground(GuiGraphics p_295678_, int p_296491_, int p_294260_, float p_294869_) voidsetBookAccess(BookViewScreen.BookAccess p_98289_) booleansetPage(int p_98276_) private voidMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, advancePanoramaTime, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
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.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
PAGE_INDICATOR_TEXT_Y_OFFSET
public static final int PAGE_INDICATOR_TEXT_Y_OFFSET- See Also:
-
PAGE_TEXT_X_OFFSET
public static final int PAGE_TEXT_X_OFFSET- See Also:
-
PAGE_TEXT_Y_OFFSET
public static final int PAGE_TEXT_Y_OFFSET- See Also:
-
EMPTY_ACCESS
-
BOOK_LOCATION
-
TEXT_WIDTH
protected static final int TEXT_WIDTH- See Also:
-
TEXT_HEIGHT
protected static final int TEXT_HEIGHT- See Also:
-
IMAGE_WIDTH
protected static final int IMAGE_WIDTH- See Also:
-
IMAGE_HEIGHT
protected static final int IMAGE_HEIGHT- See Also:
-
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
Description copied from class:ScreenNeo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)replicates this method in place of a super call to insert an event- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen
-
renderBackground
- Overrides:
renderBackgroundin classScreen
-
mouseClicked
public boolean mouseClicked(double p_98272_, double p_98273_, int p_98274_) -
handleComponentClicked
- Overrides:
handleComponentClickedin classScreen
-
closeScreen
protected void closeScreen() -
getClickedComponentStyleAt
-