diff --git a/java/squeek/quakemovement/ModConfigGui.java b/java/squeek/quakemovement/ModConfigGui.java deleted file mode 100644 index 078dc10..0000000 --- a/java/squeek/quakemovement/ModConfigGui.java +++ /dev/null @@ -1,13 +0,0 @@ -package squeek.quakemovement; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.common.config.ConfigElement; -import net.minecraftforge.fml.client.config.GuiConfig; - -public class ModConfigGui extends GuiConfig -{ - public ModConfigGui(GuiScreen parentScreen) - { - super(parentScreen, new ConfigElement(ModConfig.config.getCategory(ModConfig.CATEGORY_MOVEMENT)).getChildElements(), ModInfo.MODID, false, false, GuiConfig.getAbridgedConfigPath(ModConfig.config.toString())); - } -} diff --git a/java/squeek/quakemovement/ModConfigGuiFactory.java b/java/squeek/quakemovement/ModConfigGuiFactory.java index a06e599..23c506e 100644 --- a/java/squeek/quakemovement/ModConfigGuiFactory.java +++ b/java/squeek/quakemovement/ModConfigGuiFactory.java @@ -1,33 +1,20 @@ package squeek.quakemovement; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.fml.client.IModGuiFactory; +import net.minecraftforge.common.config.ConfigElement; +import net.minecraftforge.fml.client.DefaultGuiFactory; +import net.minecraftforge.fml.client.config.GuiConfig; -import java.util.Set; - -public class ModConfigGuiFactory implements IModGuiFactory +public class ModConfigGuiFactory extends DefaultGuiFactory { - @Override - public void initialize(Minecraft minecraftInstance) - { - } - - @Override - public Class mainConfigGuiClass() - { - return ModConfigGui.class; - } - - @Override - public Set runtimeGuiCategories() + public ModConfigGuiFactory() { - return null; + super(ModInfo.MODID, GuiConfig.getAbridgedConfigPath(ModConfig.config.toString())); } @Override - public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) + public GuiScreen createConfigGui(GuiScreen parentScreen) { - return null; + return new GuiConfig(parentScreen, new ConfigElement(ModConfig.config.getCategory(ModConfig.CATEGORY_MOVEMENT)).getChildElements(), modid, false, false, title); } }