From 29770a651daa38a18b99eecd5ecf90cf90ceeb0f Mon Sep 17 00:00:00 2001 From: isXander Date: Sun, 13 Nov 2022 20:13:39 +0000 Subject: changelog & remove YACLConfigManager.java as it was actually pretty useless, document GsonConfigInstance as well --- src/testmod/java/dev/isxander/yacl/test/config/Entrypoint.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/testmod/java') 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 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 getConfig() { - return YACLConfigManager.getConfigInstance(ConfigData.class); + return config; } } -- cgit