Created
October 11, 2016 04:54
-
-
Save LexManos/ca57c1f29365bf492f207e4aa1a7865c to your computer and use it in GitHub Desktop.
Config Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file | |
general { | |
# This is a really long | |
# Multi-line comment | |
S:Comments=Hi Tv! | |
# Min: -10.5 | |
# Max: 100.5 | |
D:DoubleRange=10.0 | |
# Min: -10 | |
# Max: 100 | |
D:IntRange=10.0 | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file | |
general { | |
B:Bool=false | |
B:BoolA < | |
false | |
true | |
> | |
I:Byt=1 | |
I:BytA < | |
1 | |
2 | |
> | |
I:Chr=65 | |
I:ChrA < | |
65 | |
66 | |
> | |
D:Dbl=1.0 | |
D:DblA < | |
1.0 | |
2.0 | |
> | |
D:Flt=1.0 | |
D:FltA < | |
1.0 | |
2.0 | |
> | |
I:Int=1 | |
I:IntA < | |
1 | |
2 | |
> | |
I:Srt=1 | |
I:SrtA < | |
1 | |
2 | |
> | |
S:Str=STRING! | |
S:StrA < | |
STR | |
ING! | |
> | |
B:bool=false | |
B:boolA < | |
false | |
true | |
> | |
I:byt=1 | |
I:bytA < | |
1 | |
2 | |
> | |
I:chr=97 | |
I:chrA < | |
97 | |
98 | |
> | |
D:dbl=1.0 | |
D:dblA < | |
1.0 | |
2.0 | |
> | |
S:enu=BIG | |
D:flt=1.0 | |
D:fltA < | |
1.0 | |
2.0 | |
> | |
I:intA < | |
1 | |
2 | |
> | |
I:int_=1 | |
I:srt=1 | |
I:srtA < | |
1 | |
2 | |
> | |
inner { | |
S:HeyLook=I'm Inside! | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.minecraftforge.debug; | |
import net.minecraftforge.common.MinecraftForge; | |
import net.minecraftforge.common.config.Config; | |
import net.minecraftforge.common.config.Config.*; | |
import net.minecraftforge.fml.common.Mod; | |
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | |
@Mod(modid = ConfigTest.MODID, name = "ConfigTest", version = "1.0") | |
public class ConfigTest | |
{ | |
public static final String MODID = "config_test"; | |
@Mod.EventHandler | |
public void preInit(FMLPreInitializationEvent event) { | |
MinecraftForge.EVENT_BUS.register(this); | |
} | |
@Config(modid = MODID, type = Type.INSTANCE, name = MODID + "_types") | |
public static class CONFIG_TYPES | |
{ | |
public static boolean bool = false; | |
public static boolean[] boolA = {false, true}; | |
public static Boolean Bool = false; | |
public static Boolean[] BoolA = {false, true}; | |
public static float flt = 1.0f; | |
public static float[] fltA = {1.0f, 2.0f}; | |
public static Float Flt = 1.0f; | |
public static Float[] FltA = {1.0f, 2.0f}; | |
public static double dbl = 1.0d; | |
public static double[] dblA = {1.0d, 2.0d}; | |
public static Double Dbl = 1.0D; | |
public static Double[] DblA = {1.0D, 2.0D}; | |
public static byte byt = 1; | |
public static byte[] bytA = {1, 2}; | |
public static Byte Byt = 1; | |
public static Byte[] BytA = {1, 2}; | |
public static char chr = 'a'; | |
public static char[] chrA = {'a', 'b'}; | |
public static Character Chr = 'A'; | |
public static Character[] ChrA = {'A', 'B'}; | |
public static short srt = 1; | |
public static short[] srtA = {1, 2}; | |
public static Short Srt = 1; | |
public static Short[] SrtA = {1, 2}; | |
public static int int_ = 1; | |
public static int[] intA = {1, 2}; | |
public static Integer Int = 1; | |
public static Integer[] IntA = {1, 2}; | |
public static String Str = "STRING!"; | |
public static String[] StrA = {"STR", "ING!"}; | |
public static TEST enu = TEST.BIG; | |
public static NestedType Inner = new NestedType(); | |
public enum TEST { BIG, BAD, WOLF; } | |
public static class NestedType | |
{ | |
public String HeyLook = "I'm Inside!"; | |
} | |
} | |
@Config(modid = MODID) | |
public static class CONFIG_ANNOTATIONS | |
{ | |
@RangeDouble(min = -10.5, max = 100.5) | |
public static double DoubleRange = 10.0; | |
@RangeInt(min = -10, max = 100) | |
public static double IntRange = 10; | |
@LangKey("this.is.not.a.good.key") | |
@Comment({"This is a really long", "Multi-line comment"}) | |
public static String Comments = "Hi Tv!"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment