Class BaseConfigScreen

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
All Implemented Interfaces:
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

public class BaseConfigScreen extends ConfigScreen
  • Field Details

    • COLOR_TITLE_A

      public static final Color COLOR_TITLE_A
    • COLOR_TITLE_B

      public static final Color COLOR_TITLE_B
    • COLOR_TITLE_C

      public static final Color COLOR_TITLE_C
    • DISABLED_RENDERER

      public static final FadableScreenElement DISABLED_RENDERER
    • returnOnClose

      protected boolean returnOnClose
  • Constructor Details

    • BaseConfigScreen

      public BaseConfigScreen(@Nullable net.minecraft.client.gui.screens.Screen parent, String modID)
  • Method Details

    • setDefaultActionFor

      public static void setDefaultActionFor(String modID, UnaryOperator<BaseConfigScreen> transform)
      If you want to change the config labels, add a default action here. Make sure you call either withSpecs(ForgeConfigSpec, ForgeConfigSpec, ForgeConfigSpec) or searchForConfigSpecs()
      Parameters:
      modID - the modID of your addon/mod
    • searchForConfigSpecs

      public BaseConfigScreen searchForConfigSpecs()
      If you have static references to your Configs or ConfigSpecs (like Create does in AllConfigs), please use withSpecs(ModConfigSpec, ModConfigSpec, ModConfigSpec) instead
    • withSpecs

      public BaseConfigScreen withSpecs(@Nullable net.neoforged.neoforge.common.ModConfigSpec client, @Nullable net.neoforged.neoforge.common.ModConfigSpec common, @Nullable net.neoforged.neoforge.common.ModConfigSpec server)
    • withButtonLabels

      public BaseConfigScreen withButtonLabels(@Nullable String client, @Nullable String common, @Nullable String server)
    • init

      protected void init()
      Overrides:
      init in class AbstractSimiScreen
    • renderWindow

      protected void renderWindow(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks)
      Overrides:
      renderWindow in class ConfigScreen
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class AbstractSimiScreen