aboutsummaryrefslogtreecommitdiff
path: root/src/testmod
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2022-11-13 20:13:39 +0000
committerisXander <xandersmith2008@gmail.com>2022-11-13 20:13:39 +0000
commit29770a651daa38a18b99eecd5ecf90cf90ceeb0f (patch)
tree3aa03fb50e98eccc5c6422c35c575b7bb3541e9e /src/testmod
parent6f3dc40a6bc554b6decb685cb6d1eb6370b1eea6 (diff)
downloadYetAnotherConfigLib-29770a651daa38a18b99eecd5ecf90cf90ceeb0f.tar.gz
YetAnotherConfigLib-29770a651daa38a18b99eecd5ecf90cf90ceeb0f.tar.bz2
YetAnotherConfigLib-29770a651daa38a18b99eecd5ecf90cf90ceeb0f.zip
changelog & remove YACLConfigManager.java as it was actually pretty useless, document GsonConfigInstance as well
Diffstat (limited to 'src/testmod')
-rw-r--r--src/testmod/java/dev/isxander/yacl/test/config/Entrypoint.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testmod/java/dev/isxander/yacl/test/config/Entrypoint.java b/src/testmod/java/dev/isxander/yacl/test/config/Entrypoint.java
index 7875700..39baffa 100644
--- a/src/testmod/java/dev/isxander/yacl/test/config/Entrypoint.java
+++ b/src/testmod/java/dev/isxander/yacl/test/config/Entrypoint.java
@@ -3,17 +3,19 @@ package dev.isxander.yacl.test.config;
import com.google.gson.Gson;
import dev.isxander.yacl.config.ConfigInstance;
import dev.isxander.yacl.config.GsonConfigInstance;
-import dev.isxander.yacl.config.YACLConfigManager;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;
public class Entrypoint implements ClientModInitializer {
+ private static GsonConfigInstance<ConfigData> config;
+
@Override
public void onInitializeClient() {
- YACLConfigManager.register(new GsonConfigInstance<>(ConfigData.class, FabricLoader.getInstance().getConfigDir().resolve("yacl-test.json"), new Gson()));
+ config = new GsonConfigInstance<>(ConfigData.class, FabricLoader.getInstance().getConfigDir().resolve("yacl-test.json"));
+ config.load();
}
public static ConfigInstance<ConfigData> getConfig() {
- return YACLConfigManager.getConfigInstance(ConfigData.class);
+ return config;
}
}