mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2025-10-23 16:42:41 +02:00
27 lines
945 B
Java
27 lines
945 B
Java
package thetadev.constructionwand.data;
|
|
|
|
import net.minecraft.data.DataGenerator;
|
|
import net.minecraft.data.PackOutput;
|
|
import net.minecraftforge.common.data.ExistingFileHelper;
|
|
import net.minecraftforge.data.event.GatherDataEvent;
|
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
import net.minecraftforge.fml.common.Mod;
|
|
|
|
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
|
public class ModData
|
|
{
|
|
@SubscribeEvent
|
|
public static void gatherData(GatherDataEvent event) {
|
|
DataGenerator generator = event.getGenerator();
|
|
PackOutput packOutput = generator.getPackOutput();
|
|
ExistingFileHelper fileHelper = event.getExistingFileHelper();
|
|
|
|
if(event.includeServer()) {
|
|
generator.addProvider(true, new RecipeGenerator(packOutput));
|
|
}
|
|
|
|
if(event.includeClient()) {
|
|
generator.addProvider(true, new ItemModelGenerator(packOutput, fileHelper));
|
|
}
|
|
}
|
|
}
|