Search in sources :

Example 1 with BlockTagsProvider

use of net.minecraft.data.tags.BlockTagsProvider 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);
        }
    });
}
Also used : ExistingFileHelper(net.minecraftforge.common.data.ExistingFileHelper) DataGenerator(net.minecraft.data.DataGenerator) BlockTagsProvider(net.minecraft.data.tags.BlockTagsProvider)

Aggregations

DataGenerator (net.minecraft.data.DataGenerator)1 BlockTagsProvider (net.minecraft.data.tags.BlockTagsProvider)1 ExistingFileHelper (net.minecraftforge.common.data.ExistingFileHelper)1