mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
Add @Name annotation to config system allowing you to use custom key for value.
Also added category option to root config to allow customization. See examples/docs for information.
This commit is contained in:
1 parent
a4a6d5fa6c
commit
5cce054548
4 files changed
+118
-61
No files matched your search
@@ -71,4 +71,24 @@ public class ConfigTest
|
||||
@Comment({"This is a really long", "Multi-line comment"})
|
||||
public static String Comments = "Hi Tv!";
|
||||
}
|
||||
@Config(modid = MODID, name = MODID + "_subcats", category = "")
|
||||
public static class CONFIG_SUBCATS
|
||||
{
|
||||
//public static String THIS_WILL_ERROR = "DUH";
|
||||
|
||||
@Name("test_a")
|
||||
public static SubCat sub1 = new SubCat("Hello");
|
||||
@Name("test_b")
|
||||
public static SubCat sub2 = new SubCat("Goodbye");
|
||||
|
||||
public static class SubCat
|
||||
{
|
||||
@Name("i_say")
|
||||
public static String value;
|
||||
public SubCat(String value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user