Browse Source

loottable测试

00ll00 6 years ago
parent
commit
cca58910e5
2 changed files with 33 additions and 1 deletions
  1. 31 0
      data/item/loot_tables/chests/test.json
  2. 2 1
      data/item/tags/items/bonus.json

+ 31 - 0
data/item/loot_tables/chests/test.json

@@ -0,0 +1,31 @@
+{
+    "type": "minecraft:chest",
+    "pools": [
+      {
+        "rolls": 1,
+        "entries": [
+          {
+            "type": "minecraft:item",
+            "weight": 1,
+            "functions": [
+              {
+                "function": "minecraft:set_damage",
+                "damage": {
+                  "min": 0.1,
+                  "max": 0.5
+                }
+              },
+              {
+                "function": "minecraft:enchant_randomly"
+              },
+              {
+                "function": "minecraft:set_nbt",
+                "tag": "{\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"item_name\":\"\\\"弓\\\"\",\"bonus_give_items\":[{\"id\":\"minecraft:arrow\",\"Count\":64,\"tag\":{\"is_bonus\":1b}}]}"
+              }
+            ],
+            "name": "minecraft:bow"
+          }
+        ]
+      }
+    ]
+  }

+ 2 - 1
data/item/tags/items/bonus.json

@@ -1,5 +1,6 @@
 {
     "values": [
-        "minecraft:fishing_rod"
+        "minecraft:fishing_rod",
+        "minecraft:bow"
     ]
 }