Class BookEditScreen
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.BookEditScreen
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
Modifier and TypeFieldDescriptionprivate PageButton
private static final FormattedCharSequence
private final ItemStack
private Button
private int
private BookEditScreen.DisplayCache
private Button
private static final Component
private static final Component
private Button
private PageButton
private int
private static final FormattedCharSequence
private final InteractionHand
private static final int
private static final int
private boolean
private boolean
private long
private int
private final Player
private final Component
private final TextFieldHelper
private Component
private Button
private static final int
private static final int
private String
private final TextFieldHelper
Fields inherited from class net.minecraft.client.gui.screens.Screen
font, height, itemRenderer, minecraft, passEvents, renderables, width
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionBookEditScreen
(Player p_98076_, ItemStack p_98077_, InteractionHand p_98078_) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private boolean
bookKeyPressed
(int p_98153_, int p_98154_, int p_98155_) private void
changeLine
(int p_98098_) boolean
charTyped
(char p_98085_, int p_98086_) private void
private void
private BookEditScreen.Pos2i
convertLocalToScreen
(BookEditScreen.Pos2i p_98146_) private BookEditScreen.Pos2i
convertScreenToLocal
(BookEditScreen.Pos2i p_98115_) private Rect2i
createPartialLineSelection
(String p_98120_, StringSplitter p_98121_, int p_98122_, int p_98123_, int p_98124_, int p_98125_) private Rect2i
createSelection
(BookEditScreen.Pos2i p_98117_, BookEditScreen.Pos2i p_98118_) private void
(package private) static int
findLineFromPos
(int[] p_98150_, int p_98151_) private String
private String
private BookEditScreen.DisplayCache
private int
protected void
init()
private void
keyDown()
private void
keyEnd()
private void
keyHome()
boolean
keyPressed
(int p_98100_, int p_98101_, int p_98102_) private void
keyUp()
boolean
mouseClicked
(double p_98088_, double p_98089_, int p_98090_) boolean
mouseDragged
(double p_98092_, double p_98093_, int p_98094_, double p_98095_, double p_98096_) private void
pageBack()
private void
private BookEditScreen.DisplayCache
void
private void
renderCursor
(PoseStack p_98109_, BookEditScreen.Pos2i p_98110_, boolean p_98111_) private void
renderHighlight
(Rect2i[] p_98139_) private void
saveChanges
(boolean p_98161_) private void
selectWord
(int p_98142_) private void
setClipboard
(String p_98148_) private void
setCurrentPageText
(String p_98159_) void
tick()
private boolean
titleKeyPressed
(int p_98164_, int p_98165_, int p_98166_) private void
private void
updateLocalCopy
(boolean p_182575_) Methods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderWithTooltip, resize, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
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
changeFocus, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseReleased, mouseScrolled, setInitialFocus
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
-
Field Details
-
TEXT_WIDTH
private static final int TEXT_WIDTH- See Also:
-
TEXT_HEIGHT
private static final int TEXT_HEIGHT- See Also:
-
IMAGE_WIDTH
private static final int IMAGE_WIDTH- See Also:
-
IMAGE_HEIGHT
private static final int IMAGE_HEIGHT- See Also:
-
EDIT_TITLE_LABEL
-
FINALIZE_WARNING_LABEL
-
BLACK_CURSOR
-
GRAY_CURSOR
-
owner
-
book
-
isModified
private boolean isModified -
isSigning
private boolean isSigning -
frameTick
private int frameTick -
currentPage
private int currentPage -
pages
-
title
-
pageEdit
-
titleEdit
-
lastClickTime
private long lastClickTime -
lastIndex
private int lastIndex -
forwardButton
-
backButton
-
doneButton
-
signButton
-
finalizeButton
-
cancelButton
-
hand
-
displayCache
-
pageMsg
-
ownerText
-
-
Constructor Details
-
BookEditScreen
-
-
Method Details
-
setClipboard
-
getClipboard
-
getNumPages
private int getNumPages() -
tick
public void tick() -
init
protected void init() -
pageBack
private void pageBack() -
pageForward
private void pageForward() -
updateButtonVisibility
private void updateButtonVisibility() -
eraseEmptyTrailingPages
private void eraseEmptyTrailingPages() -
saveChanges
private void saveChanges(boolean p_98161_) -
updateLocalCopy
private void updateLocalCopy(boolean p_182575_) -
appendPageToBook
private void appendPageToBook() -
keyPressed
public boolean keyPressed(int p_98100_, int p_98101_, int p_98102_) - Specified by:
keyPressed
in interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
- Overrides:
keyPressed
in classScreen
-
charTyped
public boolean charTyped(char p_98085_, int p_98086_) -
bookKeyPressed
private boolean bookKeyPressed(int p_98153_, int p_98154_, int p_98155_) -
keyUp
private void keyUp() -
keyDown
private void keyDown() -
changeLine
private void changeLine(int p_98098_) -
keyHome
private void keyHome() -
keyEnd
private void keyEnd() -
titleKeyPressed
private boolean titleKeyPressed(int p_98164_, int p_98165_, int p_98166_) -
getCurrentPageText
-
setCurrentPageText
-
render
- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classScreen
-
renderCursor
-
renderHighlight
-
convertScreenToLocal
-
convertLocalToScreen
-
mouseClicked
public boolean mouseClicked(double p_98088_, double p_98089_, int p_98090_) -
selectWord
private void selectWord(int p_98142_) -
mouseDragged
public boolean mouseDragged(double p_98092_, double p_98093_, int p_98094_, double p_98095_, double p_98096_) -
getDisplayCache
-
clearDisplayCache
private void clearDisplayCache() -
clearDisplayCacheAfterPageChange
private void clearDisplayCacheAfterPageChange() -
rebuildDisplayCache
-
findLineFromPos
static int findLineFromPos(int[] p_98150_, int p_98151_) -
createPartialLineSelection
private Rect2i createPartialLineSelection(String p_98120_, StringSplitter p_98121_, int p_98122_, int p_98123_, int p_98124_, int p_98125_) -
createSelection
-