Class BoundedEntry<T extends Number & Comparable<T>>

java.lang.Object
net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<AbstractConfigEntry>
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:
ColorEntry, DoubleEntry, FloatEntry, IntegerEntry, LongEntry

public abstract class BoundedEntry<T extends Number & Comparable<T>> extends AbstractTextEntry<T>
  • Constructor Details

  • Method Details

    • isWithinBounds

      protected Boolean isWithinBounds(T value)
    • getBounds

      protected DefaultProperty.Bounded<T> getBounds()
    • parse

      protected abstract T parse(String input) throws NumberFormatException
      Throws:
      NumberFormatException
    • getRegexFilter

      protected abstract String getRegexFilter()
    • isPartialInput

      protected abstract boolean isPartialInput(String input)
    • setupEditBox

      protected void setupEditBox(net.minecraft.client.gui.components.EditBox box)
      Description copied from class: AbstractTextEntry
      Attaches live responders or input filters to the EditBox (e.g., coloring text red on invalid input).
      Specified by:
      setupEditBox in class AbstractTextEntry<T extends Number & Comparable<T>>
    • applyInput

      protected void applyInput(String input)
      Description copied from class: AbstractTextEntry
      Called when the user commits their input (Presses Enter or clicks away).
      Specified by:
      applyInput in class AbstractTextEntry<T extends Number & Comparable<T>>
    • getCurrentValueTooltipText

      protected net.minecraft.network.chat.Component getCurrentValueTooltipText()
    • getBoundsTooltipText

      protected net.minecraft.network.chat.Component getBoundsTooltipText()
    • extractContent

      public void extractContent(@NotNull @NotNull net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, boolean isHovering, float partialTick)
      Overrides:
      extractContent in class OptionEntry<T extends Number & Comparable<T>, net.minecraft.client.gui.components.EditBox>