summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-20 20:50:37 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-20 20:50:37 +0100
commit969cd92b2e5324d5c2aee226bf02383fa588afbf (patch)
tree1f8224e6233e960f7258b92a20eec27c8b091737 /src
parenta100d988f275c9ae434d641437e4807c1287a25f (diff)
downloadfunny-teleporters-969cd92b2e5324d5c2aee226bf02383fa588afbf.tar.gz
funny-teleporters-969cd92b2e5324d5c2aee226bf02383fa588afbf.tar.bz2
funny-teleporters-969cd92b2e5324d5c2aee226bf02383fa588afbf.zip
Add pickaxe breaking tag
Diffstat (limited to 'src')
-rw-r--r--src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json5
-rw-r--r--src/main/java/moe/nea/funnyteleporters/FunnyDataGenerator.java1
-rw-r--r--src/main/java/moe/nea/funnyteleporters/FunnyTagGenerator.java20
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));
+ }
+}