package top.leisuretimedock.dglabgame.datagen;

import net.minecraft.data.DataGenerator;
import net.minecraft.data.PackOutput;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.data.event.GatherDataEvent;
import org.jetbrains.annotations.NotNull;
import top.leisuretimedock.dglabgame.DGLabGame;
import top.leisuretimedock.dglabgame.datagen.value.DLGLangKey;
import top.r3944realms.lib39.datagen.provider.SimpleLanguageProvider;
import top.r3944realms.lib39.datagen.value.McLocale;

public class DLGDataGenEvent {
    public static void gatherData(@NotNull GatherDataEvent event) {
        DGLabGame.getLogger().info("GatherDataEvent thread: {}", Thread.currentThread().getName());
        DataGenerator gen = event.getGenerator();
        ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
        PackOutput packOutput = gen.getPackOutput();
        gen.addProvider(true, new SimpleLanguageProvider(packOutput, DGLabGame.MOD_ID, McLocale.EN_US, DLGLangKey.INSTANCE));
        gen.addProvider(true, new SimpleLanguageProvider(packOutput, DGLabGame.MOD_ID, McLocale.ZH_CN, DLGLangKey.INSTANCE));
        gen.addProvider(true, new SimpleLanguageProvider(packOutput, DGLabGame.MOD_ID, McLocale.ZH_TW, DLGLangKey.INSTANCE));
        gen.addProvider(true, new SimpleLanguageProvider(packOutput, DGLabGame.MOD_ID, McLocale.LZH, DLGLangKey.INSTANCE));
    }
}
