Jelajahi Sumber

debug信息

HerobrineXia 5 tahun lalu
induk
melakukan
c6d143fd8f
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      data/mini/functions/diamond/player_death.mcfunction

+ 2 - 0
data/mini/functions/diamond/player_death.mcfunction

@@ -9,11 +9,13 @@ effect give @s weakness 30 1
 # 处理玩家掉落物品
 execute at @s as @e[type=item,distance=..100] store result score @s temp run data get entity @s Age
 execute at @s store result score #total_drop temp run tag @e[type=item,scores={temp=..4}] add death_drop
+tellraw @a [{"selector":"@s"},{"text":"一共掉了"},{"score": {"name":"#total_drop","objective": "temp"}},{"text":"件物品"}]
 scoreboard players reset @e[type=item] temp
 # 单独处理钻石还没写
 # 掉落数量向上取整
 scoreboard players add #total_drop temp 1
 scoreboard players operation #total_drop temp /= #const_2 mem
+tellraw @a [{"selector":"@s"},{"text":"将掉落"},{"score": {"name":"#total_drop","objective": "temp"}},{"text":"件物品"}]
 execute if score #total_drop temp matches 1.. run function mini:diamond/game/item_drop
 # 其余物品丢回背包
 tag @s add dead_player