HerobrineXia 6 лет назад
Родитель
Сommit
c2e08c9a60
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      data/ltw/functions/shop/summon_block.mcfunction

+ 10 - 0
data/ltw/functions/shop/summon_block.mcfunction

@@ -0,0 +1,10 @@
+# 给予金块
+summon item ~ ~ ~ {Item:{id:"gold_block",Count:1b},Tags:["score_item"],PickupDelay:0}
+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
+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 ltw:shop/summon_block
+
+