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>
  • 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.