Class AbstractSignEditScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractSignEditScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement
- Direct Known Subclasses:
HangingSignEditScreen,SignEditScreen
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intCounts the number of screen updates.private final booleanprivate intThe index of the line that is being edited.private final String[]protected final SignBlockEntityReference to the sign object.private TextFieldHelperprivate SignTextprotected final WoodTypeFields 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, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSignEditScreen(SignBlockEntity pSign, boolean pIsFrontText, boolean pIsFiltered) AbstractSignEditScreen(SignBlockEntity pSign, boolean pIsFrontText, boolean pIsFiltered, Component pTitle) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char pCodePoint, int pModifiers) Called when a character is typed within the GUI element.protected abstract org.joml.Vector3fprotected abstract floatprotected voidinit()booleanprivate booleanisValid()booleankeyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.voidonClose()private voidonDone()voidremoved()voidrender(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) Renders the graphical user interface (GUI) element.voidrenderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) private voidrenderSign(GuiGraphics pGuiGraphics) protected abstract voidrenderSignBackground(GuiGraphics pGuiGraphics) private voidrenderSignText(GuiGraphics pGuiGraphics) private voidsetMessage(String p_277913_) voidtick()Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleClickEvent, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, 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
getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
sign
Reference to the sign object. -
text
-
messages
-
isFrontText
private final boolean isFrontText -
woodType
-
frame
private int frameCounts the number of screen updates. -
line
private int lineThe index of the line that is being edited. -
signField
-
-
Constructor Details
-
AbstractSignEditScreen
-
AbstractSignEditScreen
public AbstractSignEditScreen(SignBlockEntity pSign, boolean pIsFrontText, boolean pIsFiltered, Component pTitle)
-
-
Method Details
-
init
protected void init() -
tick
public void tick() -
isValid
private boolean isValid() -
keyPressed
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.- Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen- Parameters:
pKeyCode- the key code of the pressed key.pScanCode- the scan code of the pressed key.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
charTyped
public boolean charTyped(char pCodePoint, int pModifiers) Called when a character is typed within the GUI element.- Parameters:
pCodePoint- the code point of the typed character.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
render
Renders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
pGuiGraphics- the GuiGraphics object used for rendering.pMouseX- the x-coordinate of the mouse cursor.pMouseY- the y-coordinate of the mouse cursor.pPartialTick- the partial tick time.
-
renderBackground
public void renderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) - Overrides:
renderBackgroundin classScreen
-
onClose
public void onClose() -
removed
public void removed() -
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classScreen
-
renderSignBackground
-
getSignTextScale
protected abstract org.joml.Vector3f getSignTextScale() -
getSignYOffset
protected abstract float getSignYOffset() -
renderSign
-
renderSignText
-
setMessage
-
onDone
private void onDone()
-