Просмотр исходного кода

Merge branch 'master' of https://github.com/LTCatt/LTW3

LTCatt 6 лет назад
Родитель
Сommit
34c4455bbc

+ 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 - 0
data/item/functions/bonus_item/tp.mcfunction

@@ -1,6 +1,7 @@
 #as item
 tp @s @a[tag=item_op,limit=1]
 tag @s add bonus_old
+tellraw @a ["退回了物品",{"selector": "@s"}]
 # 判断是否需要清除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