From 2f229fbe176def377a121e232d9cfee4f41cb812 Mon Sep 17 00:00:00 2001 From: glyceryl <494192175@qq.com> Date: Sun, 18 Aug 2024 16:20:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddg=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../whispergrove/core/data/Data.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/hiedacamellia/whispergrove/core/data/Data.java b/src/main/java/org/hiedacamellia/whispergrove/core/data/Data.java index 891240c..a7a071c 100644 --- a/src/main/java/org/hiedacamellia/whispergrove/core/data/Data.java +++ b/src/main/java/org/hiedacamellia/whispergrove/core/data/Data.java @@ -1,14 +1,20 @@ package org.hiedacamellia.whispergrove.core.data; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.data.event.GatherDataEvent; +import org.hiedacamellia.whispergrove.WhisperGrove; import org.hiedacamellia.whispergrove.core.data.lang.ChineseLanguageProvider; import org.hiedacamellia.whispergrove.core.data.lang.ClassicalChineseLanguageProvider; import org.hiedacamellia.whispergrove.core.data.lang.EnglishLanguageProvider; -import org.hiedacamellia.whispergrove.core.data.provider.ModelProvider; -import org.hiedacamellia.whispergrove.core.data.provider.StateProvider; +import org.hiedacamellia.whispergrove.core.data.provider.WGItemModelProvider; +import org.hiedacamellia.whispergrove.core.data.provider.WGBlockStateProvider; import org.hiedacamellia.whispergrove.core.data.provider.WGRecipeProvider; +@EventBusSubscriber(modid = WhisperGrove.MODID, bus = EventBusSubscriber.Bus.MOD) public class Data { + + @SubscribeEvent public static void onGatherData(GatherDataEvent event) { var gen = event.getGenerator(); var packOutput = gen.getPackOutput(); @@ -16,8 +22,9 @@ public static void onGatherData(GatherDataEvent event) { gen.addProvider(event.includeClient(), new EnglishLanguageProvider(packOutput)); gen.addProvider(event.includeClient(), new ChineseLanguageProvider(packOutput)); gen.addProvider(event.includeClient(), new ClassicalChineseLanguageProvider(packOutput)); - gen.addProvider(event.includeClient(), new ModelProvider(packOutput, helper)); - gen.addProvider(event.includeClient(), new StateProvider(packOutput, helper)); + gen.addProvider(event.includeClient(), new WGItemModelProvider(packOutput, helper)); + gen.addProvider(event.includeClient(), new WGBlockStateProvider(packOutput, helper)); gen.addProvider(event.includeServer(), new WGRecipeProvider(packOutput, event.getLookupProvider())); } -} + +} \ No newline at end of file