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
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static classNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PageButtonprivate static final FormattedCharSequenceprivate final ItemStackprivate Buttonprivate intprivate BookEditScreen.DisplayCacheprivate Buttonprivate static final Componentprivate static final Componentprivate Buttonprivate PageButtonprivate intprivate static final FormattedCharSequenceprivate final InteractionHandprivate static final intprivate static final intprivate booleanprivate booleanprivate longprivate intprivate final Playerprivate final Componentprivate final TextFieldHelperprivate Componentprivate Buttonprivate static final intprivate static final intprivate Stringprivate final TextFieldHelperFields 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, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionBookEditScreen(Player p_98076_, ItemStack p_98077_, InteractionHand p_98078_) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate booleanbookKeyPressed(int p_98153_, int p_98154_, int p_98155_) private voidchangeLine(int p_98098_) booleancharTyped(char p_98085_, int p_98086_) private voidprivate voidprivate BookEditScreen.Pos2iconvertLocalToScreen(BookEditScreen.Pos2i p_98146_) private BookEditScreen.Pos2iconvertScreenToLocal(BookEditScreen.Pos2i p_98115_) private Rect2icreatePartialLineSelection(String p_98120_, StringSplitter p_98121_, int p_98122_, int p_98123_, int p_98124_, int p_98125_) private Rect2icreateSelection(BookEditScreen.Pos2i p_98117_, BookEditScreen.Pos2i p_98118_) private void(package private) static intfindLineFromPos(int[] p_98150_, int p_98151_) private Stringprivate Stringprivate BookEditScreen.DisplayCacheprivate intprotected voidinit()private voidkeyDown()private voidkeyEnd()private voidkeyHome()booleankeyPressed(int p_98100_, int p_98101_, int p_98102_) private voidkeyUp()booleanmouseClicked(double p_98088_, double p_98089_, int p_98090_) booleanmouseDragged(double p_98092_, double p_98093_, int p_98094_, double p_98095_, double p_98096_) private voidpageBack()private voidprivate BookEditScreen.DisplayCachevoidrender(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 eventvoidrenderBackground(GuiGraphics p_294860_, int p_295019_, int p_294307_, float p_295562_) private voidrenderCursor(GuiGraphics p_281833_, BookEditScreen.Pos2i p_282190_, boolean p_282412_) private voidrenderHighlight(GuiGraphics p_282188_, Rect2i[] p_265482_) private voidsaveChanges(boolean p_98161_) private voidselectWord(int p_98142_) private voidsetClipboard(String p_98148_) private voidsetCurrentPageText(String p_98159_) voidtick()private booleantitleKeyPressed(int p_98164_, int p_98165_, int p_98166_) private voidprivate 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, 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, 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
getChildAt, getCurrentFocusPath, isFocused, keyReleased, 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
-
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:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin 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: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
-
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
-