Class BoundedEntry<T extends Number & Comparable<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>
johnsmith.configoverhauled.impl.client.gui.entry.bounded.BoundedEntry<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:
ColorEntry,DoubleEntry,FloatEntry,IntegerEntry,LongEntry
-
Field Summary
Fields inherited from class johnsmith.configoverhauled.impl.client.gui.entry.OptionEntry
isLocked, labelComponent, minecraft, onValueChanged, parentScreen, property, resetButton, tooltip, widget -
Constructor Summary
ConstructorsConstructorDescriptionBoundedEntry(DefaultProperty.Bounded<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyInput(String input) Called when the user commits their input (Presses Enter or clicks away).protected DefaultProperty.Bounded<T> protected net.minecraft.network.chat.Componentprotected net.minecraft.network.chat.Componentprotected abstract Stringprotected abstract booleanisPartialInput(String input) protected BooleanisWithinBounds(T value) protected abstract TvoidrenderContent(@NotNull net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, boolean isHovering, float partialTick) protected voidsetupEditBox(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 johnsmith.configoverhauled.impl.client.gui.entry.AbstractTextEntry
createWidget, restoreCurrentValueMethods inherited from class johnsmith.configoverhauled.impl.client.gui.entry.OptionEntry
canReset, children, getDefaultValueTooltip, isDefault, isModified, matchesSearch, narratables, resetToDefault, setValue, updateResetButton, updateWidgetValueMethods inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry
focusPathAtIndex, getFocused, isDragging, mouseClicked, nextFocusPath, 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, keyPressed, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
BoundedEntry
public BoundedEntry(DefaultProperty.Bounded<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged)
-
-
Method Details
-
isWithinBounds
-
getBounds
-
parse
- Throws:
NumberFormatException
-
getRegexFilter
-
isPartialInput
-
setupEditBox
protected void setupEditBox(net.minecraft.client.gui.components.EditBox box) Description copied from class:AbstractTextEntryAttaches live responders or input filters to the EditBox (e.g., coloring text red on invalid input).- Specified by:
setupEditBoxin classAbstractTextEntry<T extends Number & Comparable<T>>
-
applyInput
Description copied from class:AbstractTextEntryCalled when the user commits their input (Presses Enter or clicks away).- Specified by:
applyInputin classAbstractTextEntry<T extends Number & Comparable<T>>
-
getCurrentValueTooltipText
protected net.minecraft.network.chat.Component getCurrentValueTooltipText() -
getBoundsTooltipText
protected net.minecraft.network.chat.Component getBoundsTooltipText() -
renderContent
public void renderContent(@NotNull @NotNull net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, boolean isHovering, float partialTick) - Overrides:
renderContentin classOptionEntry<T extends Number & Comparable<T>,net.minecraft.client.gui.components.EditBox>
-