LTCatt 6 tahun lalu
induk
melakukan
53863b7516
1 mengubah file dengan 2 tambahan dan 3 penghapusan
  1. 2 3
      data/ltw/functions/shop/refresh_gold.mcfunction

+ 2 - 3
data/ltw/functions/shop/refresh_gold.mcfunction

@@ -5,16 +5,15 @@ clear @s gold_nugget
 
 # 获取金锭数,存于 temp
 scoreboard players operation @s temp = @s gold
-scoreboard players operation @s temp /= #count_9 mem
+scoreboard players operation @s temp /= #const_9 mem
 # 给予金锭
 execute if score @s temp matches 1.. at @s run summon item ~ ~ ~ {Item:{id:"gold_ingot",Count:1b},Tags:["score_item_ingot"],PickupDelay:0}
 execute if score @s temp matches 1.. store result entity @e[type=item,tag=score_item_ingot,limit=1] Item.Count byte 1 run scoreboard players get @s temp
 execute if score @s temp matches 1.. run data modify entity @e[type=item,tag=score_item_ingot,limit=1] Owner set from entity @s UUID
 # 获取金粒数,存于 temp
 scoreboard players operation @s temp = @s gold
-scoreboard players operation @s temp %= #count_9 mem
+scoreboard players operation @s temp %= #const_9 mem
 # 给予金粒
 execute if score @s temp matches 1.. at @s run summon item ~ ~ ~ {Item:{id:"gold_nugget",Count:1b},Tags:["score_item_nugget"],PickupDelay:0}
 execute if score @s temp matches 1.. store result entity @e[type=item,tag=score_item_nugget,limit=1] Item.Count byte 1 run scoreboard players get @s temp
 execute if score @s temp matches 1.. run data modify entity @e[type=item,tag=score_item_nugget,limit=1] Owner set from entity @s UUID
-# TODO : 给予指定数量的物品