2021-02-27 16:33:00 +01:00
|
|
|
package de.ellpeck.actuallyadditions.data;
|
|
|
|
|
|
|
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
2021-11-26 00:51:59 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
2021-02-27 16:33:00 +01:00
|
|
|
import net.minecraft.data.BlockTagsProvider;
|
|
|
|
import net.minecraft.data.DataGenerator;
|
2021-11-26 00:51:59 +01:00
|
|
|
import net.minecraft.tags.BlockTags;
|
2021-02-27 16:33:00 +01:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
import net.minecraftforge.common.data.ExistingFileHelper;
|
|
|
|
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
import java.nio.file.Path;
|
|
|
|
|
|
|
|
public class BlockTagsGenerator extends BlockTagsProvider {
|
|
|
|
public BlockTagsGenerator(DataGenerator generatorIn, @Nullable ExistingFileHelper existingFileHelper) {
|
|
|
|
super(generatorIn, ActuallyAdditions.MODID, existingFileHelper);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2021-08-22 17:09:06 +02:00
|
|
|
public void addTags() {
|
2021-11-26 00:51:59 +01:00
|
|
|
tag(BlockTags.WALLS).add(
|
|
|
|
ActuallyBlocks.ETHETIC_WHITE_WALL.get(),
|
|
|
|
ActuallyBlocks.ETHETIC_GREEN_WALL.get(),
|
|
|
|
ActuallyBlocks.BLACK_QUARTZ_WALL.get(),
|
|
|
|
ActuallyBlocks.SMOOTH_BLACK_QUARTZ_WALL.get(),
|
|
|
|
ActuallyBlocks.BLACK_QUARTZ_PILLAR_WALL.get(),
|
|
|
|
ActuallyBlocks.CHISELED_BLACK_QUARTZ_WALL.get(),
|
|
|
|
ActuallyBlocks.BLACK_QUARTZ_BRICK_WALL.get()
|
|
|
|
);
|
2021-02-27 16:33:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Resolves a Path for the location to save the given tag.
|
|
|
|
*/
|
|
|
|
@Override
|
2021-08-22 17:09:06 +02:00
|
|
|
protected Path getPath(ResourceLocation id) {
|
2021-02-27 16:33:00 +01:00
|
|
|
return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json");
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a name for this provider, to use in logging.
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public String getName() {
|
|
|
|
return "Block Tags";
|
|
|
|
}
|
|
|
|
}
|