diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-20 20:50:37 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-20 20:50:37 +0100 |
commit | 969cd92b2e5324d5c2aee226bf02383fa588afbf (patch) | |
tree | 1f8224e6233e960f7258b92a20eec27c8b091737 | |
parent | a100d988f275c9ae434d641437e4807c1287a25f (diff) | |
download | funny-teleporters-969cd92b2e5324d5c2aee226bf02383fa588afbf.tar.gz funny-teleporters-969cd92b2e5324d5c2aee226bf02383fa588afbf.tar.bz2 funny-teleporters-969cd92b2e5324d5c2aee226bf02383fa588afbf.zip |
Add pickaxe breaking tag
3 files changed, 26 insertions, 0 deletions
diff --git a/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json b/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json new file mode 100644 index 0000000..f126a94 --- /dev/null +++ b/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json @@ -0,0 +1,5 @@ +{ + "values": [ + "funny-teleporters:coloured_chest" + ] +}
\ No newline at end of file diff --git a/src/main/java/moe/nea/funnyteleporters/FunnyDataGenerator.java b/src/main/java/moe/nea/funnyteleporters/FunnyDataGenerator.java index f57cc28..b4c8b85 100644 --- a/src/main/java/moe/nea/funnyteleporters/FunnyDataGenerator.java +++ b/src/main/java/moe/nea/funnyteleporters/FunnyDataGenerator.java @@ -9,6 +9,7 @@ public class FunnyDataGenerator implements DataGeneratorEntrypoint { var pack = dataGenerator.createPack(); pack.addProvider(FunnyRecipeProvider::new); pack.addProvider(FunnyDropTableProvider::new); + pack.addProvider(FunnyTagGenerator::new); } } diff --git a/src/main/java/moe/nea/funnyteleporters/FunnyTagGenerator.java b/src/main/java/moe/nea/funnyteleporters/FunnyTagGenerator.java new file mode 100644 index 0000000..338b8d1 --- /dev/null +++ b/src/main/java/moe/nea/funnyteleporters/FunnyTagGenerator.java @@ -0,0 +1,20 @@ +package moe.nea.funnyteleporters; + +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; +import net.minecraft.registry.Registries; +import net.minecraft.registry.RegistryWrapper; +import net.minecraft.registry.tag.BlockTags; + +import java.util.concurrent.CompletableFuture; + +public class FunnyTagGenerator extends FabricTagProvider.BlockTagProvider { + public FunnyTagGenerator(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) { + super(output, registriesFuture); + } + + @Override + protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) { + getTagBuilder(BlockTags.PICKAXE_MINEABLE).add(Registries.BLOCK.getId(FunnyRegistry.COLOURED_CHEST)); + } +} |