aboutsummaryrefslogtreecommitdiff
path: root/src/testmod/java/dev/isxander/yacl/test/config/Entrypoint.java
blob: 39baffa8b337a99c03b8619ba7237c4288a7352c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package dev.isxander.yacl.test.config;

import com.google.gson.Gson;
import dev.isxander.yacl.config.ConfigInstance;
import dev.isxander.yacl.config.GsonConfigInstance;
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() {
        config = new GsonConfigInstance<>(ConfigData.class, FabricLoader.getInstance().getConfigDir().resolve("yacl-test.json"));
        config.load();
    }

    public static ConfigInstance<ConfigData> getConfig() {
        return config;
    }
}