@@ -1,5 +1,6 @@
{
"is_bonus": true,
+ "bonus_clear_nbt":true,
"bonus_new": true,
"bonus_return": true,
"item_name":"{\"text\": \"破损的钓鱼竿\",\"color\": \"green\"}",
@@ -1,4 +1,6 @@
#as item
tp @s @a[tag=item_op,limit=1]
tag @s add bonus_old
+# 判断是否需要清除nbt tag
+execute if data entity @s Item.tag{"bonus_clear_nbt":true} run data remove entity @s Item.tag
data modify entity @s PickupDelay set value 0
@@ -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,\"bonus_clear_nbt\":1b}}]}"
+ ],
+ "name": "minecraft:bow"
+ ]
"values": [
- "minecraft:fishing_rod"
+ "minecraft:fishing_rod",
+ "minecraft:bow"
]
}