mirror of
https://github.com/GTNewHorizons/GTNHLib.git
synced 2026-11-26 14:53:14 +00:00
Add @Config.{RequiresMod, RequiresModOr and RequiresModAnd} to the config system (#334)
This commit is contained in:
1 parent
09c0d95ed2
commit
71cd464286
4 files changed
+138
-24
No files matched your search
@@ -35,9 +35,9 @@ public class ExampleConfig {
|
||||
@Config.Entry(RedCategory.class)
|
||||
@Config.Order(0)
|
||||
// the ordering happens right after SortedCategory so it will be on top
|
||||
public static testCategory redCategory = new testCategory();
|
||||
public static TestCategory redCategory = new TestCategory();
|
||||
|
||||
public static class testCategory {
|
||||
public static class TestCategory {
|
||||
|
||||
@Config.Comment("This category button should have RED text.")
|
||||
@Config.Entry(RedCategory.class)
|
||||
@@ -68,6 +68,29 @@ public class ExampleConfig {
|
||||
public boolean yellowBoolean = true;
|
||||
}
|
||||
|
||||
@Config.Comment("Only visible in GUI if 'Hodgepodge' mod is loaded.")
|
||||
@Config.RequiresMod("hodgepodge")
|
||||
public static boolean hodgepodgeIntegration = true;
|
||||
|
||||
@Config.Comment("Only visible in GUI if 'nei' or 'jei' is loaded.")
|
||||
@Config.RequiresMod({ "nei", "jei" })
|
||||
public static boolean itemSearchIntegration = false;
|
||||
|
||||
@Config.Comment("This entire category is hidden unless 'thaumcraft' is loaded.")
|
||||
@Config.RequiresMod(value = { "thaumcraft", "thaumicenergistics" }, mode = Config.RequiresMod.Mode.AND)
|
||||
@Config.Order(1)
|
||||
public static ThaumcraftCategory thaumcraft = new ThaumcraftCategory();
|
||||
|
||||
public static class ThaumcraftCategory {
|
||||
|
||||
@Config.Comment("Enable Thaumcraft research tweaks.")
|
||||
public boolean researchTweaks = true;
|
||||
|
||||
@Config.Comment("Only visible if 'thaumicbases' is also present.")
|
||||
@Config.RequiresMod("thaumicbases")
|
||||
public boolean thaumicBasesCompat = false;
|
||||
}
|
||||
|
||||
public static class SortedCategory extends GuiConfigEntries.CategoryEntry {
|
||||
|
||||
public SortedCategory(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
|
||||
|
||||
Reference in new issue
Block a user