LTCatt 5 anos atrás
pai
commit
f87783acc6

+ 1 - 3
data/ltw/functions/clock/tick20.mcfunction

@@ -1,10 +1,8 @@
 # 每秒执行一次
 # 每秒执行一次
 schedule function ltw:clock/tick20 20t replace
 schedule function ltw:clock/tick20 20t replace
 
 
-# 恢复生命
-execute if score $state mem matches 0 run effect give @a instant_health 1 10 true
-
 # 调用其他模块
 # 调用其他模块
+execute if score $state mem matches 0 run function ltw:state/0/tick20
 function ltw:main/tick20
 function ltw:main/tick20
 function lib:music/tick20
 function lib:music/tick20
 
 

+ 2 - 2
data/ltw/functions/init/all.mcfunction

@@ -25,12 +25,12 @@ scoreboard objectives remove temp2
 scoreboard objectives add temp2 dummy "缓存 2"
 scoreboard objectives add temp2 dummy "缓存 2"
 scoreboard objectives remove UUID
 scoreboard objectives remove UUID
 scoreboard objectives add UUID dummy "UUID"
 scoreboard objectives add UUID dummy "UUID"
-scoreboard objectives remove leave_game
-scoreboard objectives add leave_game minecraft.custom:leave_game "离开游戏计数"
 scoreboard objectives remove music_time
 scoreboard objectives remove music_time
 scoreboard objectives add music_time dummy "音乐倒计时"
 scoreboard objectives add music_time dummy "音乐倒计时"
 scoreboard objectives remove music_now
 scoreboard objectives remove music_now
 scoreboard objectives add music_now dummy "音乐曲目"
 scoreboard objectives add music_now dummy "音乐曲目"
+# 无需移除的全局记分板
+scoreboard objectives add leave_game minecraft.custom:leave_game "离开游戏计数"
 
 
 # ---------------------------------------------
 # ---------------------------------------------
 #  数字常量
 #  数字常量

+ 3 - 0
data/ltw/functions/state/0/tick20.mcfunction

@@ -0,0 +1,3 @@
+
+# 恢复生命
+execute if score $state mem matches 0 run effect give @a instant_health 1 10 true

+ 3 - 5
data/ltw/functions/state/0/tick5.mcfunction

@@ -1,7 +1,7 @@
 
 
-# 隐藏/显示 骰子房老板的名片
-execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s if entity @a[distance=..5] run data modify entity @s CustomNameVisible set value true
-execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s unless entity @a[distance=..5] run data modify entity @s CustomNameVisible set value false
+## 隐藏/显示 骰子房老板的名片
+#execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s if entity @a[distance=..5] run data modify entity @s CustomNameVisible set value true
+#execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s unless entity @a[distance=..5] run data modify entity @s CustomNameVisible set value false
 
 
 # 调用节奏方块
 # 调用节奏方块
 function lib:tempo_block/tick5
 function lib:tempo_block/tick5
@@ -44,5 +44,3 @@ execute if score $start_countdown mem matches 0 run function ltw:state/0/start_g
 # 显示信息
 # 显示信息
 execute if score $start_countdown mem matches 1..999 run title @a[team=!debugging] actionbar [{"text":"","color":"green"},{"score":{"name":"#ready_count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
 execute if score $start_countdown mem matches 1..999 run title @a[team=!debugging] actionbar [{"text":"","color":"green"},{"score":{"name":"#ready_count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
 execute if score $start_countdown mem matches 999.. run title @a[team=!debugging] actionbar [{"text":"","color":"red"},{"score":{"name":"#ready_count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 需要 3 人以开始游戏"]
 execute if score $start_countdown mem matches 999.. run title @a[team=!debugging] actionbar [{"text":"","color":"red"},{"score":{"name":"#ready_count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 需要 3 人以开始游戏"]
-
-