Skip to content

Commit

Permalink
Upadte config GUI for 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed Jun 19, 2018
1 parent 9d29dda commit 076e4c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
13 changes: 0 additions & 13 deletions java/squeek/quakemovement/ModConfigGui.java

This file was deleted.

29 changes: 8 additions & 21 deletions java/squeek/quakemovement/ModConfigGuiFactory.java
Original file line number Diff line number Diff line change
@@ -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<? extends GuiScreen> mainConfigGuiClass()
{
return ModConfigGui.class;
}

@Override
public Set<RuntimeOptionCategoryElement> 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);
}
}

0 comments on commit 076e4c0

Please sign in to comment.