Class AbstractTextEntry<T>

java.lang.Object
net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<AbstractConfigEntry>
johnsmith.configoverhauled.api.client.gui.entry.AbstractConfigEntry
johnsmith.configoverhauled.impl.client.gui.entry.OptionEntry<T,net.minecraft.client.gui.components.EditBox>
johnsmith.configoverhauled.impl.client.gui.entry.AbstractTextEntry<T>
All Implemented Interfaces:
ConfigEntry, net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement
Direct Known Subclasses:
BoundedEntry, ListEntry, StringEntry

public abstract class AbstractTextEntry<T> extends OptionEntry<T,net.minecraft.client.gui.components.EditBox>
  • Field Summary

    Fields inherited from class johnsmith.configoverhauled.impl.client.gui.entry.OptionEntry

    isLocked, labelComponent, minecraft, onValueChanged, parentScreen, property, resetButton, tooltip, widget
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractTextEntry(Property<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    Called when the user commits their input (Presses Enter or clicks away).
    protected net.minecraft.client.gui.components.EditBox
     
    protected void
    Utility method to revert the UI if the committed input was invalid.
    protected abstract void
    setupEditBox(net.minecraft.client.gui.components.EditBox box)
    Attaches live responders or input filters to the EditBox (e.g., coloring text red on invalid input).

    Methods inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry

    focusPathAtIndex, getFocused, isDragging, mouseClicked, nextFocusPath, 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

    charTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    getBorderForArrowNavigation, getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteraction

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Constructor Details

    • AbstractTextEntry

      public AbstractTextEntry(Property<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged)
  • Method Details

    • createWidget

      protected net.minecraft.client.gui.components.EditBox createWidget()
      Specified by:
      createWidget in class OptionEntry<T,net.minecraft.client.gui.components.EditBox>
    • setupEditBox

      protected abstract void setupEditBox(net.minecraft.client.gui.components.EditBox box)
      Attaches live responders or input filters to the EditBox (e.g., coloring text red on invalid input).
    • applyInput

      protected abstract void applyInput(String input)
      Called when the user commits their input (Presses Enter or clicks away).
    • restoreCurrentValue

      protected void restoreCurrentValue()
      Utility method to revert the UI if the committed input was invalid.