generated from NeoForgeMDKs/MDK-1.21-ModDevGradle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
17 changes: 12 additions & 5 deletions
17
src/main/java/org/hiedacamellia/whispergrove/core/data/Data.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
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(); | ||
var helper = event.getExistingFileHelper(); | ||
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())); | ||
} | ||
} | ||
|
||
} |