瀏覽代碼

史莱姆打到自己不加分

HerobrineXia 6 年之前
父節點
當前提交
d5ba37d59c
共有 1 個文件被更改,包括 3 次插入 和 1 次删除
  1. 3 1
      data/mini/functions/slime/game/damage_taken.mcfunction

+ 3 - 1
data/mini/functions/slime/game/damage_taken.mcfunction

@@ -1,2 +1,4 @@
 execute as @a[tag=mini_running] store result score @s UUID run data get entity @s UUID[0]
-execute as @a[tag=mini_running] if score @s UUID = $slime_last_hit mem run say 我打到人要加分!
+tag @s add self_hurt
+execute as @a[tag=mini_running,tag=!self_hurt] if score @s UUID = $slime_last_hit mem run say 我打到人要加分!
+tag @s remove self_hurt