use of net.minecraftforge.client.model.generators.ItemModelProvider in project MinecraftForge by MinecraftForge.
the class NewModelLoaderTest method datagen.
private void datagen(GatherDataEvent event) {
DataGenerator gen = event.getGenerator();
if (event.includeClient()) {
// Let blockstate provider see generated item models by passing its existing file helper
ItemModelProvider itemModels = new ItemModels(gen, event.getExistingFileHelper());
gen.addProvider(itemModels);
gen.addProvider(new BlockStates(gen, itemModels.existingFileHelper));
}
}
use of net.minecraftforge.client.model.generators.ItemModelProvider in project MinecraftForge by MinecraftForge.
the class DataGeneratorTest method gatherData.
@SubscribeEvent
public static void gatherData(GatherDataEvent event) {
GSON = new GsonBuilder().registerTypeAdapter(Variant.class, new Variant.Deserializer()).registerTypeAdapter(ItemTransforms.class, new ItemTransforms.Deserializer()).registerTypeAdapter(ItemTransform.class, new ItemTransform.Deserializer()).create();
DataGenerator gen = event.getGenerator();
if (event.includeClient()) {
gen.addProvider(new Lang(gen));
// Let blockstate provider see generated item models by passing its existing file helper
ItemModelProvider itemModels = new ItemModels(gen, event.getExistingFileHelper());
gen.addProvider(itemModels);
gen.addProvider(new BlockStates(gen, itemModels.existingFileHelper));
gen.addProvider(new SoundDefinitions(gen, event.getExistingFileHelper()));
}
if (event.includeServer()) {
gen.addProvider(new Recipes(gen));
gen.addProvider(new Tags(gen, event.getExistingFileHelper()));
gen.addProvider(new Advancements(gen, event.getExistingFileHelper()));
}
}
Aggregations