Class BookEditScreen
java.lang.Object
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
,TabOrderedElement
-
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
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, PANORAMA, renderables, screenExecutor, width
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
render
(GuiGraphics p_281724_, int p_282965_, int p_283294_, float p_281293_) 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 eventvoid
renderBackground
(GuiGraphics p_294860_, int p_295019_, int p_294307_, float p_295562_) private void
renderCursor
(GuiGraphics p_281833_, BookEditScreen.Pos2i p_282190_, boolean p_282412_) private void
renderHighlight
(GuiGraphics p_282188_, Rect2i[] p_265482_) 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
Methods 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, handleComponentClicked, 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, 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
getChildAt, getCurrentFocusPath, isFocused, keyReleased, 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
-
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() -
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
Description copied from class:Screen
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 event- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classScreen
-
renderBackground
- Overrides:
renderBackground
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
-