use of net.minecraft.data.DataGenerator in project MinecraftForge by MinecraftForge.
the class RemoveTagDatagenTest method onGatherData.
private void onGatherData(GatherDataEvent event) {
DataGenerator generator = event.getGenerator();
ExistingFileHelper helper = event.getExistingFileHelper();
generator.addProvider(new BlockTagsProvider(generator, MODID, helper) {
@SuppressWarnings("unchecked")
@Override
protected void addTags() {
this.tag(TEST_TAG).remove(Blocks.DIRT.getRegistryName()).remove(Blocks.OAK_DOOR.getRegistryName(), Blocks.DARK_OAK_DOOR.getRegistryName()).remove(Blocks.ANVIL).remove(Blocks.BASALT, Blocks.POLISHED_BASALT).remove(BlockTags.BEEHIVES).remove(BlockTags.BANNERS, BlockTags.BEDS);
}
});
}
use of net.minecraft.data.DataGenerator 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.minecraft.data.DataGenerator in project Tropicraft by Tropicraft.
the class Tropicraft method gatherData.
private void gatherData(GatherDataEvent event) {
DataGenerator gen = event.getGenerator();
ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
if (event.includeClient()) {
TropicraftBlockstateProvider blockstates = new TropicraftBlockstateProvider(gen, existingFileHelper);
gen.addProvider(blockstates);
gen.addProvider(new TropicraftItemModelProvider(gen, blockstates.getExistingHelper()));
gen.addProvider(new TropicraftLangProvider(gen));
}
if (event.includeServer()) {
TropicraftBlockTagsProvider blockTags = new TropicraftBlockTagsProvider(gen, existingFileHelper);
gen.addProvider(blockTags);
gen.addProvider(new TropicraftItemTagsProvider(gen, blockTags, existingFileHelper));
gen.addProvider(new TropicraftRecipeProvider(gen));
gen.addProvider(new TropicraftLootTableProvider(gen));
gen.addProvider(new TropicraftEntityTypeTagsProvider(gen, existingFileHelper));
gatherWorldgenData(gen);
}
}
use of net.minecraft.data.DataGenerator in project Ceramics by KnightMiner.
the class Ceramics method gatherData.
private void gatherData(GatherDataEvent event) {
if (event.includeServer()) {
DataGenerator gen = event.getGenerator();
ExistingFileHelper helper = event.getExistingFileHelper();
BlockTagsProvider blockTags = new BlockTagProvider(gen, helper);
gen.addProvider(blockTags);
gen.addProvider(new ItemTagProvider(gen, blockTags, helper));
gen.addProvider(new FluidTagProvider(gen, helper));
gen.addProvider(new RecipeProvider(gen));
gen.addProvider(new LootTableProvider(gen));
}
}
use of net.minecraft.data.DataGenerator in project MinecraftForge by MinecraftForge.
the class ForgeMod method gatherData.
public void gatherData(GatherDataEvent event) {
DataGenerator gen = event.getGenerator();
if (event.includeServer()) {
ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
ForgeBlockTagsProvider blockTags = new ForgeBlockTagsProvider(gen, existingFileHelper);
gen.addProvider(blockTags);
gen.addProvider(new ForgeItemTagsProvider(gen, blockTags, existingFileHelper));
gen.addProvider(new ForgeFluidTagsProvider(gen, existingFileHelper));
gen.addProvider(new ForgeRecipeProvider(gen));
gen.addProvider(new ForgeLootTableProvider(gen));
}
}
Aggregations