1
+ package net .i_no_am .viewmodel .config ;
2
+
3
+ import io .github .itzispyder .improperui .ImproperUIAPI ;
4
+ import io .github .itzispyder .improperui .config .ConfigReader ;
5
+ import io .github .itzispyder .improperui .util .ChatUtils ;
6
+ import net .i_no_am .viewmodel .Global ;
7
+ import net .i_no_am .viewmodel .config .settings .ConfigSettings ;
8
+ import net .minecraft .util .Formatting ;
9
+
10
+ public class Config implements Global {
11
+
12
+ private static final ConfigReader VMConfig = ImproperUIAPI .getConfigReader (modId , "config.properties" );
13
+
14
+ /*First Page Settings:*/
15
+ public static ConfigSettings <Double > mainPositionX ;
16
+ public static ConfigSettings <Double > mainRotationX ;
17
+ public static ConfigSettings <Double > offPositionX ;
18
+ public static ConfigSettings <Double > offRotationX ;
19
+ public static ConfigSettings <Double > mainPositionY ;
20
+ public static ConfigSettings <Double > mainRotationY ;
21
+ public static ConfigSettings <Double > offPositionY ;
22
+ public static ConfigSettings <Double > offRotationY ;
23
+ public static ConfigSettings <Double > mainPositionZ ;
24
+ public static ConfigSettings <Double > mainRotationZ ;
25
+ public static ConfigSettings <Double > offPositionZ ;
26
+ public static ConfigSettings <Double > offRotationZ ;
27
+ /*Second Page Settings*/
28
+ public static ConfigSettings <Double > handSpeedSwing ;
29
+ public static ConfigSettings <Double > mainHandScale ;
30
+ public static ConfigSettings <Double > offHandScale ;
31
+ public static ConfigSettings <Boolean > noHandSwingV2 ;
32
+ public static ConfigSettings <Boolean > noHandSwingV1 ;
33
+ public static ConfigSettings <Boolean > noFoodSwing ;
34
+ public static ConfigSettings <Boolean > noHandRender ;
35
+
36
+ public static void loadConfig () {
37
+ /*First Page Settings:*/
38
+ mainPositionX = new ConfigSettings <>(Double .class , VMConfig .readDouble ("main-position-x" , 0.0 ));
39
+ mainRotationX = new ConfigSettings <>(Double .class , VMConfig .readDouble ("main-rotation-x" , 0.0 ));
40
+ offPositionX = new ConfigSettings <>(Double .class , VMConfig .readDouble ("off-position-x" , 0.0 ));
41
+ offRotationX = new ConfigSettings <>(Double .class , VMConfig .readDouble ("off-rotation-x" , 0.0 ));
42
+ mainPositionY = new ConfigSettings <>(Double .class , VMConfig .readDouble ("main-position-y" , 0.0 ));
43
+ mainRotationY = new ConfigSettings <>(Double .class , VMConfig .readDouble ("main-rotation-y" , 0.0 ));
44
+ offPositionY = new ConfigSettings <>(Double .class , VMConfig .readDouble ("off-position-y" , 0.0 ));
45
+ offRotationY = new ConfigSettings <>(Double .class , VMConfig .readDouble ("off-rotation-y" , 0.0 ));
46
+ mainPositionZ = new ConfigSettings <>(Double .class , VMConfig .readDouble ("main-position-z" , 0.0 ));
47
+ mainRotationZ = new ConfigSettings <>(Double .class , VMConfig .readDouble ("main-rotation-z" , 0.0 ));
48
+ offPositionZ = new ConfigSettings <>(Double .class , VMConfig .readDouble ("off-position-z" , 0.0 ));
49
+ offRotationZ = new ConfigSettings <>(Double .class , VMConfig .readDouble ("off-rotation-z" , 0.0 ));
50
+ /*Second Page Settings:*/
51
+ handSpeedSwing = new ConfigSettings <>(Double .class , VMConfig .readDouble ("hand-speed-swing" , 4.0 ));///it was 1 - 7, from now its 0 - 5 (2 and below didnt work)
52
+ mainHandScale = new ConfigSettings <>(Double .class , VMConfig .readDouble ("main-hand-scale" , 1.0 ));
53
+ offHandScale = new ConfigSettings <>(Double .class , VMConfig .readDouble ("off-hand-scale" , 1.0 ));
54
+ noHandSwingV2 = new ConfigSettings <>(Boolean .class , VMConfig .readBool ("no-hand-swing-v2" , false ));
55
+ noHandSwingV1 = new ConfigSettings <>(Boolean .class , VMConfig .readBool ("no-hand-swing-v1" , false ));
56
+ noFoodSwing = new ConfigSettings <>(Boolean .class , VMConfig .readBool ("no-food-swing" , false ));
57
+ noHandRender = new ConfigSettings <>(Boolean .class , VMConfig .readBool ("no-hand-render" , false ));
58
+ /*No Swing Logic*/
59
+ if (noHandSwingV2 .getVal () && (noHandSwingV1 .getVal ())) {
60
+ VMConfig .write ("no-hand-swing" , false );
61
+ VMConfig .write ("no-hand-swing-v2" , false );
62
+ ChatUtils .sendMessage (PREFIX + Formatting .RED + "CHOOSE ONE OPTION!" );
63
+ }
64
+ }
65
+ }
0 commit comments