Просмотр исходного кода

移动玩家数量更改判定

HerobrineXia 6 лет назад
Родитель
Сommit
a15cd7271d

+ 1 - 1
data/mini/functions/main/player_changed.mcfunction → data/ltw/functions/main/player_changed.mcfunction

@@ -2,7 +2,7 @@
 execute store result score $alive_now mem if entity @a[tag=mini_running,tag=!watcher]
 
 # 比较玩家数量
-execute unless score $alive_now mem = $alive mem run function mini:main/player_leave
+execute unless score $alive_now mem = $alive mem run function ltw:main/player_leave
 
 # 重置玩家数量
 execute unless score $alive_now mem = $alive mem run scoreboard players operation $alive mem = $alive_now mem

+ 0 - 0
data/mini/functions/main/player_leave.mcfunction → data/ltw/functions/main/player_leave.mcfunction


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

@@ -1,4 +1,5 @@
 # 离开次数为不存在,则为第一次加入游戏
 # 离开次数不为 0,则离开过游戏
+function ltw:main/player_changed
 execute as @a unless score @s leave_game matches 0 run function ltw:main/player_enter
 execute as @a unless score @s leave_game matches 0 run scoreboard players set @s leave_game 0

+ 1 - 2
data/mini/functions/main/tick4.mcfunction

@@ -1,4 +1,3 @@
-function mini:main/player_changed
 execute if score $mini_type mem matches 1 run function mini:parkour/tick4
 execute if score $mini_type mem matches 2 run function mini:tntrun/tick4
-execute if score $mini_type mem matches 3 run function mini:hotpm/tick4
+execute if score $mini_type mem matches 3 run function mini:hotpm/tick4