summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));
+ }
+}