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
Modifier and TypeClassDescriptionstatic interface
static class
static class
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
Modifier and TypeFieldDescriptionprivate PageButton
static final ResourceLocation
private BookViewScreen.BookAccess
private int
private List<FormattedCharSequence>
private int
static final BookViewScreen.BookAccess
private PageButton
protected static final int
protected static final int
static final int
static final int
static final int
private Component
private final boolean
protected static final int
protected static final int
Fields inherited from class net.minecraft.client.gui.screens.Screen
BACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ModifierConstructorDescriptionBookViewScreen
(BookViewScreen.BookAccess p_98264_) private
BookViewScreen
(BookViewScreen.BookAccess p_98266_, boolean p_98267_) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected void
protected boolean
forcePage
(int p_98295_) getClickedComponentStyleAt
(double p_98269_, double p_98270_) private int
boolean
handleComponentClicked
(Style p_98293_) protected void
init()
boolean
keyPressed
(int p_98278_, int p_98279_, int p_98280_) loadPages
(CompoundTag p_169695_) static void
loadPages
(CompoundTag p_169697_, Consumer<String> p_169698_) boolean
mouseClicked
(double p_98272_, double p_98273_, int p_98274_) protected void
pageBack()
protected void
void
render
(GuiGraphics p_281997_, int p_281262_, int p_283321_, float p_282251_) void
renderBackground
(GuiGraphics p_295678_, int p_296491_, int p_294260_, float p_294869_) void
setBookAccess
(BookViewScreen.BookAccess p_98289_) boolean
setPage
(int p_98276_) private void
Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, renderDirtBackground, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods 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:
keyPressed
in interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
- Overrides:
keyPressed
in classScreen
-
render
- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classScreen
-
renderBackground
- Overrides:
renderBackground
in classScreen
-
mouseClicked
public boolean mouseClicked(double p_98272_, double p_98273_, int p_98274_) -
handleComponentClicked
- Overrides:
handleComponentClicked
in classScreen
-
closeScreen
protected void closeScreen() -
getClickedComponentStyleAt
-
loadPages
-
loadPages
-