Kaynağa Gözat

修复能乱扔物品的bug

HerobrineXia 5 yıl önce
ebeveyn
işleme
348c667a3b

+ 1 - 0
data/item/functions/shop/summon_emerald.mcfunction

@@ -3,6 +3,7 @@ summon item ~ ~ ~ {Item:{id:"emerald",Count:1b,tag:{stats_item:1b}},Tags:["score
 execute if score @s temp matches 1..64 store result entity @e[type=item,tag=score_item,limit=1] Item.Count byte 1 run scoreboard players get @s temp
 execute if score @s temp matches 65.. run data modify entity @e[type=item,tag=score_item,limit=1] Item.Count set value 64b 
 data modify entity @e[type=item,tag=score_item,limit=1] Owner set from entity @s UUID
+data modify entity @e[type=item,tag=score_item,limit=1] Thrower set from entity @s UUID
 tag @e[type=item,tag=score_item] remove score_item
 scoreboard players remove @s temp 64
 execute if score @s temp matches 1.. run function item:shop/summon_emerald

+ 1 - 0
data/item/functions/shop/summon_emerald_block.mcfunction

@@ -3,6 +3,7 @@ summon item ~ ~ ~ {Item:{id:"emerald_block",Count:1b,tag:{stats_item:1b}},Tags:[
 execute if score @s temp matches 1..64 store result entity @e[type=item,tag=score_item,limit=1] Item.Count byte 1 run scoreboard players get @s temp
 execute if score @s temp matches 65.. run data modify entity @e[type=item,tag=score_item,limit=1] Item.Count set value 64b 
 data modify entity @e[type=item,tag=score_item,limit=1] Owner set from entity @s UUID
+data modify entity @e[type=item,tag=score_item,limit=1] Thrower set from entity @s UUID
 tag @e[type=item,tag=score_item] remove score_item
 scoreboard players remove @s temp 64
 execute if score @s temp matches 1.. run function item:shop/summon_emerald_block

+ 1 - 0
data/item/functions/shop/summon_gold.mcfunction

@@ -3,6 +3,7 @@ summon item ~ ~ ~ {Item:{id:"gold_ingot",Count:1b,tag:{stats_item:1b}},Tags:["sc
 execute if score @s temp matches 1..64 store result entity @e[type=item,tag=score_item,limit=1] Item.Count byte 1 run scoreboard players get @s temp
 execute if score @s temp matches 65.. run data modify entity @e[type=item,tag=score_item,limit=1] Item.Count set value 64b 
 data modify entity @e[type=item,tag=score_item,limit=1] Owner set from entity @s UUID
+data modify entity @e[type=item,tag=score_item,limit=1] Thrower set from entity @s UUID
 tag @e[type=item,tag=score_item] remove score_item
 scoreboard players remove @s temp 64
 execute if score @s temp matches 1.. run function item:shop/summon_gold

+ 1 - 0
data/item/functions/shop/summon_gold_block.mcfunction

@@ -3,6 +3,7 @@ summon item ~ ~ ~ {Item:{id:"gold_block",Count:1b,tag:{stats_item:1b}},Tags:["sc
 execute if score @s temp matches 1..64 store result entity @e[type=item,tag=score_item,limit=1] Item.Count byte 1 run scoreboard players get @s temp
 execute if score @s temp matches 65.. run data modify entity @e[type=item,tag=score_item,limit=1] Item.Count set value 64b 
 data modify entity @e[type=item,tag=score_item,limit=1] Owner set from entity @s UUID
+data modify entity @e[type=item,tag=score_item,limit=1] Thrower set from entity @s UUID
 tag @e[type=item,tag=score_item] remove score_item
 scoreboard players remove @s temp 64
 execute if score @s temp matches 1.. run function item:shop/summon_gold_block

+ 1 - 0
data/item/functions/shop/summon_nugget.mcfunction

@@ -3,6 +3,7 @@ summon item ~ ~ ~ {Item:{id:"gold_nugget",Count:1b,tag:{stats_item:1b}},Tags:["s
 execute if score @s temp matches 1..64 store result entity @e[type=item,tag=score_item,limit=1] Item.Count byte 1 run scoreboard players get @s temp
 execute if score @s temp matches 65.. run data modify entity @e[type=item,tag=score_item,limit=1] Item.Count set value 64b 
 data modify entity @e[type=item,tag=score_item,limit=1] Owner set from entity @s UUID
+data modify entity @e[type=item,tag=score_item,limit=1] Thrower set from entity @s UUID
 tag @e[type=item,tag=score_item] remove score_item
 scoreboard players remove @s temp 64
 execute if score @s temp matches 1.. run function item:shop/summon_nugget