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

    CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, screenExecutor, title, width

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

    DOUBLE_CLICK_THRESHOLD_MS
  • 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.
    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
    render(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick)
     
    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, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenError

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

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface johnsmith.configoverhauled.api.client.gui.screen.ConfigScreen

    updateMasterResetButton

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

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

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

    mouseMoved

    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.
    • render

      public void render(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick)
      Specified by:
      render in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      render 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()