Class OptionEntry<T, W extends net.minecraft.client.gui.components.AbstractWidget>
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,W>
- 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:
AbstractRegistryEntry, AbstractTextEntry, BooleanEntry, EnumEntry
public abstract class OptionEntry<T, W extends net.minecraft.client.gui.components.AbstractWidget>
extends AbstractConfigEntry
implements ConfigEntry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final net.minecraft.network.chat.Componentprotected final net.minecraft.client.Minecraftprotected final Runnableprotected final ConfigScreenprotected final net.minecraft.client.gui.components.Buttonprotected final List<net.minecraft.util.FormattedCharSequence> protected final W -
Constructor Summary
ConstructorsConstructorDescriptionOptionEntry(Property<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanReset()@NotNull List<? extends net.minecraft.client.gui.components.events.GuiEventListener> children()protected abstract WvoidextractContent(@NotNull net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, boolean isHovering, float partialTick) protected net.minecraft.network.chat.ComponentbooleanbooleanEvaluates if the current UI state differs from the property's defaultValue().booleanmatchesSearch(String query) Evaluates if the widget matches the current search bar query.@NotNull List<? extends net.minecraft.client.gui.narration.NarratableEntry> voidRestores the bound property to its defaultValue() and updates the UI state.protected voidprotected voidprotected abstract voidMethods inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry
focusPathAtIndex, getFocused, isDragging, mouseClicked, nextFocusPath, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, mouseDragged, mouseReleased, mouseScrolled, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
parentScreen
-
property
-
resetButton
protected final net.minecraft.client.gui.components.Button resetButton -
widget
-
labelComponent
protected final net.minecraft.network.chat.Component labelComponent -
tooltip
-
minecraft
protected final net.minecraft.client.Minecraft minecraft -
onValueChanged
-
isLocked
protected final boolean isLocked
-
-
Constructor Details
-
OptionEntry
public OptionEntry(Property<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged)
-
-
Method Details
-
matchesSearch
Description copied from interface:ConfigEntryEvaluates if the widget matches the current search bar query.- Specified by:
matchesSearchin interfaceConfigEntry
-
resetToDefault
public void resetToDefault()Description copied from interface:ConfigEntryRestores the bound property to its defaultValue() and updates the UI state.- Specified by:
resetToDefaultin interfaceConfigEntry
-
isModified
public boolean isModified()Description copied from interface:ConfigEntryEvaluates if the current UI state differs from the property's defaultValue().- Specified by:
isModifiedin interfaceConfigEntry
-
createWidget
-
updateWidgetValue
protected abstract void updateWidgetValue() -
setValue
-
isDefault
public boolean isDefault() -
canReset
public boolean canReset() -
updateResetButton
protected void updateResetButton() -
getDefaultValueTooltip
protected net.minecraft.network.chat.Component getDefaultValueTooltip() -
extractContent
public void extractContent(@NotNull @NotNull net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, boolean isHovering, float partialTick) -
children
@NotNull public @NotNull List<? extends net.minecraft.client.gui.components.events.GuiEventListener> children()- Specified by:
childrenin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
-
narratables
@NotNull public @NotNull List<? extends net.minecraft.client.gui.narration.NarratableEntry> narratables()- Specified by:
narratablesin classnet.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<AbstractConfigEntry>
-