Procházet zdrojové kódy

死亡判定延迟1tick

HerobrineXia před 5 roky
rodič
revize
b4a529d106

+ 2 - 1
data/ltw/functions/clock/tick1.mcfunction

@@ -4,4 +4,5 @@
 execute if score $state mem matches 5 run function ltw:state/5/tick1
 
 # 死亡触发
-execute as @a[scores={death=1..,health=1..}] at @s run function ltw:main/player_death
+execute as @a[tag=temp_death] at @s run function ltw:main/player_death
+execute as @a[scores={death=1..,health=1..}] run tag @s add temp_death

+ 1 - 0
data/ltw/functions/main/player_death.mcfunction

@@ -1,4 +1,5 @@
 # 当玩家死亡后触发
 scoreboard players reset @s death
+tag @s remove temp_death
 say DEBUG: 触发ltw:main/player_death
 execute if score $state mem matches 5 run function ltw:state/5/player_death