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

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 ConfigInstance<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;
    }
}