Class AbstractConfigScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
johnsmith.configoverhauled.impl.client.gui.screen.AbstractConfigScreen
- All Implemented Interfaces:
ConfigScreen, net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement
- Direct Known Subclasses:
DefaultConfigScreen
public abstract class AbstractConfigScreen
extends net.minecraft.client.gui.screens.Screen
implements ConfigScreen
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.client.gui.screens.ScreenFields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConfigScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen) protectedAbstractConfigScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen, WidgetRegistry widgetRegistry) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(net.minecraft.client.input.CharacterEvent event) voidCloses the currently active overlay modal popup, if any.<T> ConfigEntrycreateEntry(Property<T> property) Utility method for subclasses to easily create UI entries from properties.voidextractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, float partialTick) booleanChecks whether an overlay modal popup is currently open on this screen.protected booleanbooleankeyPressed(net.minecraft.client.input.KeyEvent event) booleankeyReleased(net.minecraft.client.input.KeyEvent event) voidFlags the configuration state as modified, triggering network syncs or reload alerts on close.booleanmouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) booleanmouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) booleanmouseReleased(net.minecraft.client.input.MouseButtonEvent event) booleanmouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) voidonClose()protected voidCallback triggered when a widget modifies a property's value.voidopenPopup(ConfigPopup popup) Opens an overlay modal popup on top of this configuration screen without replacing the active screen.<P extends Property<?>>
voidregisterWidget(Class<P> propertyClass, WidgetFactory<? super P> factory) Registers a custom widget factory for a specific property type.protected voidvoidsetDeferredTooltip(List<net.minecraft.util.FormattedCharSequence> tooltip) Passes a tooltip to the screen to be rendered at the highest Z-index during the render cycle.voidsetWidgetRegistry(WidgetRegistry registry) Replaces the entire widget registry used by this screen.voidtick()Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBackground, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConfigScreen
updateMasterResetButtonMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
parentScreen
protected final net.minecraft.client.gui.screens.Screen parentScreen
-
-
Constructor Details
-
AbstractConfigScreen
protected AbstractConfigScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen) -
AbstractConfigScreen
protected AbstractConfigScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen, WidgetRegistry widgetRegistry)
-
-
Method Details
-
createEntry
Utility method for subclasses to easily create UI entries from properties.- Specified by:
createEntryin interfaceConfigScreen- Type Parameters:
T- The underlying data type of the property.- Parameters:
property- The configuration property to create a widget for.- Returns:
- A newly constructed
ConfigEntryready to be appended to the screen.
-
registerWidget
public <P extends Property<?>> void registerWidget(Class<P> propertyClass, WidgetFactory<? super P> factory) Description copied from interface:ConfigScreenRegisters a custom widget factory for a specific property type. Overrides the default widget if one already exists for the provided class.- Specified by:
registerWidgetin interfaceConfigScreen- Type Parameters:
P- The property type.- Parameters:
propertyClass- The class of the property.factory- The factory responsible for creating the widget.
-
setWidgetRegistry
Description copied from interface:ConfigScreenReplaces the entire widget registry used by this screen. Must be called before the screen initializes its internal lists.- Specified by:
setWidgetRegistryin interfaceConfigScreen- Parameters:
registry- The custom registry implementation to use.
-
openPopup
Description copied from interface:ConfigScreenOpens an overlay modal popup on top of this configuration screen without replacing the active screen. If a popup is already open, it will be closed before opening the new one.- Specified by:
openPopupin interfaceConfigScreen- Parameters:
popup- The popup to display.
-
closePopup
public void closePopup()Description copied from interface:ConfigScreenCloses the currently active overlay modal popup, if any.- Specified by:
closePopupin interfaceConfigScreen
-
hasActivePopup
public boolean hasActivePopup()Description copied from interface:ConfigScreenChecks whether an overlay modal popup is currently open on this screen.- Specified by:
hasActivePopupin interfaceConfigScreen- Returns:
trueif a popup is currently active.
-
onValueChanged
protected void onValueChanged()Callback triggered when a widget modifies a property's value. -
markLevelConfigModified
public void markLevelConfigModified()Description copied from interface:ConfigScreenFlags the configuration state as modified, triggering network syncs or reload alerts on close.- Specified by:
markLevelConfigModifiedin interfaceConfigScreen
-
setDeferredTooltip
Description copied from interface:ConfigScreenPasses a tooltip to the screen to be rendered at the highest Z-index during the render cycle.- Specified by:
setDeferredTooltipin interfaceConfigScreen- Parameters:
tooltip- The formatted lines of text to display.
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.client.gui.screens.Screen
-
repositionActivePopup
protected void repositionActivePopup() -
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.Screen
-
keyReleased
public boolean keyReleased(net.minecraft.client.input.KeyEvent event) - Specified by:
keyReleasedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyReleasedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
charTyped
public boolean charTyped(net.minecraft.client.input.CharacterEvent event) - Specified by:
charTypedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
charTypedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
mouseClicked
public boolean mouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
mouseReleased
public boolean mouseReleased(net.minecraft.client.input.MouseButtonEvent event) - Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
mouseDragged
public boolean mouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) - Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) - Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
extractRenderState
public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, float partialTick) - Specified by:
extractRenderStatein interfacenet.minecraft.client.gui.components.Renderable- Overrides:
extractRenderStatein classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-
hasReloadPermission
protected boolean hasReloadPermission()
-