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

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.client.gui.screens.Screen
     

    Fields 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, renderables, screenExecutor, title, width
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractConfigScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen)
     
    protected
    AbstractConfigScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen, WidgetRegistry widgetRegistry)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createEntry(Property<T> property)
    Utility method for subclasses to easily create UI entries from properties.
    void
    extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, float partialTick)
     
    protected boolean
     
    void
    Flags the configuration state as modified, triggering network syncs or reload alerts on close.
    void
     
    protected void
    Callback triggered when a widget modifies a property's value.
    <P extends Property<?>>
    void
    registerWidget(Class<P> propertyClass, WidgetFactory<? super P> factory)
    Registers a custom widget factory for a specific property type.
    void
    setDeferredTooltip(List<net.minecraft.util.FormattedCharSequence> tooltip)
    Passes a tooltip to the screen to be rendered at the highest Z-index during the render cycle.
    void
    Replaces the entire widget registry used by this screen.

    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, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ConfigScreen

    updateMasterResetButton

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved, shouldTakeFocusAfterInteraction

    Methods 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

      public <T> ConfigEntry createEntry(Property<T> property)
      Utility method for subclasses to easily create UI entries from properties.
      Specified by:
      createEntry in interface ConfigScreen
      Type Parameters:
      T - The underlying data type of the property.
      Parameters:
      property - The configuration property to create a widget for.
      Returns:
      A newly constructed ConfigEntry ready to be appended to the screen.
    • registerWidget

      public <P extends Property<?>> void registerWidget(Class<P> propertyClass, WidgetFactory<? super P> factory)
      Description copied from interface: ConfigScreen
      Registers a custom widget factory for a specific property type. Overrides the default widget if one already exists for the provided class.
      Specified by:
      registerWidget in interface ConfigScreen
      Type Parameters:
      P - The property type.
      Parameters:
      propertyClass - The class of the property.
      factory - The factory responsible for creating the widget.
    • setWidgetRegistry

      public void setWidgetRegistry(WidgetRegistry registry)
      Description copied from interface: ConfigScreen
      Replaces the entire widget registry used by this screen. Must be called before the screen initializes its internal lists.
      Specified by:
      setWidgetRegistry in interface ConfigScreen
      Parameters:
      registry - The custom registry implementation to use.
    • onValueChanged

      protected void onValueChanged()
      Callback triggered when a widget modifies a property's value.
    • markLevelConfigModified

      public void markLevelConfigModified()
      Description copied from interface: ConfigScreen
      Flags the configuration state as modified, triggering network syncs or reload alerts on close.
      Specified by:
      markLevelConfigModified in interface ConfigScreen
    • setDeferredTooltip

      public void setDeferredTooltip(List<net.minecraft.util.FormattedCharSequence> tooltip)
      Description copied from interface: ConfigScreen
      Passes a tooltip to the screen to be rendered at the highest Z-index during the render cycle.
      Specified by:
      setDeferredTooltip in interface ConfigScreen
      Parameters:
      tooltip - The formatted lines of text to display.
    • extractRenderState

      public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, float partialTick)
      Specified by:
      extractRenderState in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      extractRenderState in class net.minecraft.client.gui.screens.Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class net.minecraft.client.gui.screens.Screen
    • hasReloadPermission

      protected boolean hasReloadPermission()