Parcourir la source

修复奖励拾取

00ll00 il y a 6 ans
Parent
commit
b41abadd34

+ 1 - 1
data/item/functions/bonus_item/return_item.mcfunction

@@ -3,5 +3,5 @@ data modify block 0 0 1 RecordItem set from block 0 0 0 RecordItem
 data modify block 0 0 1 RecordItem.tag.bonus_new set value 0b
 setblock 0 0 1 air destroy
 tag @s add item_op
-execute as @e[tag=!bonus_old,type=item,nbt={"Item":{"tag":{"is_bonus":1b}}},limit=1] run function item:bonus_item/tp
+execute as @e[tag=!bonus_old,type=item,nbt={"Item":{"tag":{"is_bonus":1b,"bonus_new":0b}}},limit=1] run function item:bonus_item/tp
 tag @s remove item_op

+ 1 - 3
data/item/functions/disable_throw.mcfunction

@@ -7,6 +7,4 @@ data modify entity @s Owner set from entity @s Thrower
 # 将物品传送给与丢弃者 UUID 相同的玩家
 execute store result score @s UUID run data get entity @s Thrower[0]
 tag @s add item_force_tp
-execute as @a if score @s UUID = @e[type=item,tag=item_force_tp,limit=1] UUID run tp @e[type=item,tag=item_force_tp] @s
-
-tellraw @a ["防止物品丢弃",{"selector": "@s"}]
+execute as @a if score @s UUID = @e[type=item,tag=item_force_tp,limit=1] UUID run tp @e[type=item,tag=item_force_tp] @s