aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/OneConfig.api40
-rw-r--r--build.gradle.kts1
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/Config.java14
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/ButtonTestPage_Test.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/ButtonTestPage_Test.java)0
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java)0
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java)0
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/TestHud_Test.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/TestHud_Test.java)0
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java14
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java)0
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java)0
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/TestPage_Test.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/TestPage_Test.java)0
-rw-r--r--versions/src/main/java/cc/polyfrost/oneconfig/test/package-info.java (renamed from src/main/java/cc/polyfrost/oneconfig/test/package-info.java)0
12 files changed, 28 insertions, 41 deletions
diff --git a/api/OneConfig.api b/api/OneConfig.api
index fa4e477..eea861a 100644
--- a/api/OneConfig.api
+++ b/api/OneConfig.api
@@ -7,6 +7,7 @@ public class cc/polyfrost/oneconfig/config/Config {
protected final field nonProfileSpecificGson Lcom/google/gson/Gson;
public final field optionNames Ljava/util/HashMap;
public fun <init> (Lcc/polyfrost/oneconfig/config/data/Mod;Ljava/lang/String;)V
+ public fun <init> (Lcc/polyfrost/oneconfig/config/data/Mod;Ljava/lang/String;Z)V
protected fun addDependency (Ljava/lang/String;Ljava/lang/String;)V
protected fun addDependency (Ljava/lang/String;Ljava/util/function/Supplier;)V
protected fun addDependency (Ljava/lang/String;Z)V
@@ -1134,45 +1135,6 @@ public class cc/polyfrost/oneconfig/renderer/scissor/ScissorManager {
public static fun scissor (JFFFF)Lcc/polyfrost/oneconfig/renderer/scissor/Scissor;
}
-public class cc/polyfrost/oneconfig/test/ButtonTestPage_Test : cc/polyfrost/oneconfig/gui/pages/Page {
- public fun <init> ()V
- public fun draw (JII)V
-}
-
-public class cc/polyfrost/oneconfig/test/TestCommand_Test {
- public fun <init> ()V
-}
-
-public class cc/polyfrost/oneconfig/test/TestConfig_Test : cc/polyfrost/oneconfig/config/Config {
- public field hud Lcc/polyfrost/oneconfig/test/TestHud_Test;
- public field multilineHud Lcc/polyfrost/oneconfig/test/TestMultilineHud_Test;
- public static field testCheckBox Z
- public field testPage Lcc/polyfrost/oneconfig/test/TestPage_Test;
- public field testPage2 Lcc/polyfrost/oneconfig/test/TestPage_Test;
- public field testSwitch Z
- public fun <init> ()V
-}
-
-public class cc/polyfrost/oneconfig/test/TestHud_Test : cc/polyfrost/oneconfig/hud/SingleTextHud {
- public field yes Z
- public fun <init> ()V
- public fun getText ()Ljava/lang/String;
-}
-
-public class cc/polyfrost/oneconfig/test/TestMultilineHud_Test : cc/polyfrost/oneconfig/hud/TextHud {
- public fun <init> ()V
- protected fun getLines (Ljava/util/List;)V
-}
-
-public class cc/polyfrost/oneconfig/test/TestNanoVGGui_Test : cc/polyfrost/oneconfig/libs/universal/UScreen {
- public fun <init> ()V
- public fun onDrawScreen (Lcc/polyfrost/oneconfig/libs/universal/UMatrixStack;IIF)V
-}
-
-public class cc/polyfrost/oneconfig/test/TestPage_Test {
- public fun <init> ()V
-}
-
public final class cc/polyfrost/oneconfig/utils/IOUtils {
public fun <init> ()V
public static fun copyImageToClipboard (Ljava/awt/Image;)V
diff --git a/build.gradle.kts b/build.gradle.kts
index 62254b3..8d888c4 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -147,4 +147,5 @@ apiValidation {
ignoredProjects.add("lwjgl")
ignoredPackages.add("cc.polyfrost.oneconfig.libs")
ignoredPackages.add("cc.polyfrost.oneconfig.internal")
+ ignoredPackages.add("cc.polyfrost.oneconfig.test")
} \ No newline at end of file
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/Config.java b/src/main/java/cc/polyfrost/oneconfig/config/Config.java
index c2661fa..dd5a578 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/Config.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/Config.java
@@ -42,15 +42,25 @@ public class Config {
transient protected final Gson nonProfileSpecificGson = new GsonBuilder().setExclusionStrategies(new NonProfileSpecificExclusionStrategy()).excludeFieldsWithModifiers(Modifier.TRANSIENT).setPrettyPrinting().create();
transient public Mod mod;
public transient boolean hasBeenInitialized = false;
- public boolean enabled = true;
+ public boolean enabled;
/**
* @param modData information about the mod
* @param configFile file where config is stored
+ * @param enabled whether the mod is enabled or not
*/
- public Config(Mod modData, String configFile) {
+ public Config(Mod modData, String configFile, boolean enabled) {
this.configFile = configFile;
this.mod = modData;
+ this.enabled = enabled;
+ }
+
+ /**
+ * @param modData information about the mod
+ * @param configFile file where config is stored
+ */
+ public Config(Mod modData, String configFile) {
+ this(modData, configFile, true);
}
public void initialize() {
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/ButtonTestPage_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/ButtonTestPage_Test.java
index fe25477..fe25477 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/ButtonTestPage_Test.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/ButtonTestPage_Test.java
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java
index 33ed5b7..33ed5b7 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java
index 772bba7..772bba7 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestHud_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestHud_Test.java
index ae557c7..ae557c7 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/TestHud_Test.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestHud_Test.java
diff --git a/versions/src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java
new file mode 100644
index 0000000..ab7587e
--- /dev/null
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java
@@ -0,0 +1,14 @@
+package cc.polyfrost.oneconfig.test;
+
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.event.FMLInitializationEvent;
+
+@net.minecraftforge.fml.common.Mod(modid = "oneconfig-test-mod", name = "Test Mod", version = "0")
+public class TestMod_Test {
+ private TestConfig_Test config;
+
+ @Mod.EventHandler
+ public void init(FMLInitializationEvent event) {
+ config = new TestConfig_Test();
+ }
+} \ No newline at end of file
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java
index 1665062..1665062 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java
index e8b6b91..e8b6b91 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestPage_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestPage_Test.java
index 0f8f692..0f8f692 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/TestPage_Test.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestPage_Test.java
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/package-info.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/package-info.java
index ef38b37..ef38b37 100644
--- a/src/main/java/cc/polyfrost/oneconfig/test/package-info.java
+++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/package-info.java