add recipes to ingame config

This commit is contained in:
maggi373 committed 2023-02-21 01:01:55 +01:00
1 parent e83c259336
commit 5ee8196b8a
2 files changed
+22 -3

No files matched your search

@@ -30,6 +30,7 @@ public class GuiMekanismConfig extends GuiConfig
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.usage"), "mekanism.configgui.ctgy.usage", UsageEntry.class));
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.client"), "mekanism.configgui.ctgy.client", ClientEntry.class));
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.mekce"), "mekanism.configgui.ctgy.mekce", MEKCEEntry.class));
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.recipe"), "mekanism.configgui.ctgy.recipe", RecipeEntry.class));
return list;
}
@@ -134,4 +135,20 @@ public class GuiMekanismConfig extends GuiConfig
GuiConfig.getAbridgedConfigPath(Mekanism.configuration.toString()));
}
}
public static class RecipeEntry extends CategoryEntry
{
public RecipeEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
{
super(owningScreen, owningEntryList, prop);
}
@Override
protected GuiScreen buildChildScreen()
{
return new GuiConfig(owningScreen,
new ConfigElement(Mekanism.configurationrecipes.getCategory("Recipes")).getChildElements(),
owningScreen.modID, "Recipes", false, false,
GuiConfig.getAbridgedConfigPath(Mekanism.configurationrecipes.toString()));
}
}
}