From 07f61a96bb08ce039ccb4ecbbab91bf056db258c Mon Sep 17 00:00:00 2001 From: Sunekaer - MAC Date: Mon, 15 Jan 2024 11:48:56 +0100 Subject: [PATCH] fix datagen --- .../java/com/sunekaer/toolkit/fabric/DataGeneration.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fabric/src/main/java/com/sunekaer/toolkit/fabric/DataGeneration.java b/fabric/src/main/java/com/sunekaer/toolkit/fabric/DataGeneration.java index faddcc7..fa0b320 100644 --- a/fabric/src/main/java/com/sunekaer/toolkit/fabric/DataGeneration.java +++ b/fabric/src/main/java/com/sunekaer/toolkit/fabric/DataGeneration.java @@ -2,6 +2,7 @@ import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricLanguageProvider; import java.util.stream.IntStream; @@ -9,11 +10,12 @@ public class DataGeneration implements DataGeneratorEntrypoint { @Override public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { - fabricDataGenerator.addProvider(new LanguageGenerator(fabricDataGenerator)); + FabricDataGenerator.Pack pack = fabricDataGenerator.createPack(); + pack.addProvider(LanguageGenerator::new); } private static class LanguageGenerator extends FabricLanguageProvider { - public LanguageGenerator(FabricDataGenerator gen) { + public LanguageGenerator(FabricDataOutput gen) { super(gen, "en_us"); }