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 classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PageButtonstatic final intstatic final intprivate final ItemStackprivate intprivate PageButtonprivate final InteractionHandstatic final intstatic final intprivate static final intprivate static final intprivate Componentprivate final Playerprivate MultiLineEditBoxprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final Componentprivate final BookSignScreenstatic final intstatic final intprivate static final ComponentFields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionBookEditScreen(Player pOwner, ItemStack pBook, InteractionHand pHand, WritableBookContent pContent) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate intprivate intprivate voidprivate intprivate Componentprotected voidinit()booleanbooleankeyPressed(KeyEvent p_446119_) private intprivate voidpageBack()private voidvoidrender(GuiGraphics p_281724_, int p_282965_, int p_283294_, float p_281293_) Renders the graphical user interface (GUI) element.voidrenderBackground(GuiGraphics p_294860_, int p_295019_, int p_294307_, float p_295562_) private voidprotected voidprivate voidprivate voidprivate voidprivate voidvisitText(ActiveTextCollector pActiveTextCollector) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isMouseOver, isPauseScreen, isValidCharacterForName, onClose, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, repositionElements, resize, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods 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, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
TEXT_WIDTH
public static final int TEXT_WIDTH- See Also:
-
TEXT_HEIGHT
public static final int TEXT_HEIGHT- See Also:
-
IMAGE_WIDTH
public static final int IMAGE_WIDTH- See Also:
-
IMAGE_HEIGHT
public static final int IMAGE_HEIGHT- See Also:
-
BACKGROUND_TEXTURE_WIDTH
public static final int BACKGROUND_TEXTURE_WIDTH- See Also:
-
BACKGROUND_TEXTURE_HEIGHT
public static final int BACKGROUND_TEXTURE_HEIGHT- See Also:
-
MENU_BUTTON_MARGIN
private static final int MENU_BUTTON_MARGIN- See Also:
-
MENU_BUTTON_SIZE
private static final int MENU_BUTTON_SIZE- See Also:
-
PAGE_BUTTON_Y
private static final int PAGE_BUTTON_Y- See Also:
-
PAGE_BACK_BUTTON_X
private static final int PAGE_BACK_BUTTON_X- See Also:
-
PAGE_FORWARD_BUTTON_X
private static final int PAGE_FORWARD_BUTTON_X- See Also:
-
PAGE_INDICATOR_TEXT_Y_OFFSET
private static final int PAGE_INDICATOR_TEXT_Y_OFFSET- See Also:
-
PAGE_INDICATOR_X_OFFSET
private static final int PAGE_INDICATOR_X_OFFSET- See Also:
-
TITLE
-
SIGN_BOOK_LABEL
-
owner
-
book
-
signScreen
-
currentPage
private int currentPage -
pages
-
forwardButton
-
backButton
-
hand
-
numberOfPages
-
page
-
-
Constructor Details
-
BookEditScreen
public BookEditScreen(Player pOwner, ItemStack pBook, InteractionHand pHand, WritableBookContent pContent)
-
-
Method Details
-
getNumPages
private int getNumPages() -
init
protected void init() -
backgroundLeft
private int backgroundLeft() -
backgroundTop
private int backgroundTop() -
setInitialFocus
protected void setInitialFocus()- Overrides:
setInitialFocusin classScreen
-
getNarrationMessage
- Overrides:
getNarrationMessagein classScreen
-
getPageNumberMessage
-
pageBack
private void pageBack() -
pageForward
private void pageForward() -
updatePageContent
private void updatePageContent() -
updateButtonVisibility
private void updateButtonVisibility() -
eraseEmptyTrailingPages
private void eraseEmptyTrailingPages() -
saveChanges
private void saveChanges() -
updateLocalCopy
private void updateLocalCopy() -
appendPageToBook
private void appendPageToBook() -
isInGameUi
public boolean isInGameUi()- Overrides:
isInGameUiin classScreen
-
keyPressed
- Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen
-
render
Description copied from interface:RenderableRenders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
p_281724_- the GuiGraphics object used for rendering.p_282965_- the x-coordinate of the mouse cursor.p_283294_- the y-coordinate of the mouse cursor.p_281293_- the partial tick time.
-
visitText
-
renderBackground
- Overrides:
renderBackgroundin classScreen
-