ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/data/AADataGenerator.java
canitzp 2c07ef0fa0
Start to work on DataGenerator. Crusher Recipes should now be able to be serialized to json by its Factory. In general the serializing to json is handled by the RecipeFactoryBase class.
Removed some Recipes after the decision to not port it or change it to loot tables in favor of recipes.
A lot more @Nonnull annotations.

Signed-off-by: canitzp <canitzp@gmail.com>
2020-10-07 08:25:54 +02:00

23 lines
981 B
Java

package de.ellpeck.actuallyadditions.data;
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.data.recipes.CrusherRecipeGenerator;
import net.minecraft.data.DataGenerator;
import net.minecraftforge.client.model.generators.ExistingFileHelper;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.GatherDataEvent;
@Mod.EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class AADataGenerator {
@SubscribeEvent
public static void gatherData(GatherDataEvent event){
DataGenerator dataGenerator = event.getGenerator();
ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
dataGenerator.addProvider(new BlockStateGenerator(dataGenerator, existingFileHelper));
dataGenerator.addProvider(new CrusherRecipeGenerator(dataGenerator));
}
}