Jelajahi Sumber

修复连续小游戏的 Bug

LTCatt 6 tahun lalu
induk
melakukan
d781c3a02e

+ 3 - 3
data/ltw/functions/main/game_end.mcfunction

@@ -6,15 +6,15 @@ tag @a remove total_rank2
 tag @a remove total_rank3
 # 1
 scoreboard players set $t_score_max total_score -2147483648
-execute as @a run function total:main/get_max_score
+execute as @a run function ltw:main/get_max_score
 execute as @a unless entity @a[tag=total_rank1] if score @s total_score = $t_score_max total_score run tag @s add total_rank1
 # 2
 scoreboard players set $t_score_max total_score -2147483648
-execute as @a[tag=!total_rank1] run function total:main/get_max_score
+execute as @a[tag=!total_rank1] run function ltw:main/get_max_score
 execute as @a[tag=!total_rank1] unless entity @a[tag=total_rank2] if score @s total_score = $t_score_max total_score run tag @s add total_rank2
 # 3
 scoreboard players set $t_score_max total_score -2147483648
-execute as @a[tag=!total_rank1,tag=!total_rank2] run function total:main/get_max_score
+execute as @a[tag=!total_rank1,tag=!total_rank2] run function ltw:main/get_max_score
 execute as @a[tag=!total_rank1,tag=!total_rank2] unless entity @a[tag=total_rank3] if score @s total_score = $t_score_max total_score run tag @s add total_rank3
 
 # 显示排名

+ 1 - 1
data/ltw/functions/state/4/state_enter.mcfunction

@@ -3,7 +3,7 @@ scoreboard players set $state mem 4
 execute as @a run function ltw:state/4/player_enter
 
 # HUD
-scoreboard objectives setdisplay sidebar
+scoreboard objectives setdisplay sidebar total_score
 
 # 初始化倒计时
 scoreboard players set $countdown mem 10

+ 2 - 2
data/ltw/functions/state/7/state_enter.mcfunction

@@ -6,5 +6,5 @@ execute as @a run function ltw:state/7/player_enter
 scoreboard objectives setdisplay sidebar total_score
 
 # 判断进入下一轮小游戏或结束
-execute if score $game_type mem matches 1 if score $round mem matches ..2 run function ltw:state/7/continue_gameparty
-execute if score $game_type mem matches 1 if score $round mem matches 3.. run function ltw:main/game_end
+execute if score $game_type mem matches 1 if score $round mem matches ..3 run function ltw:state/7/continue_gameparty
+execute if score $game_type mem matches 1 if score $round mem matches 4.. run function ltw:main/game_end

+ 3 - 3
data/mini/functions/hotpm/game_init.mcfunction

@@ -1,6 +1,9 @@
 # 初始化热土豆地图
 forceload add 1000 3000 1100 3100
 
+# 关闭伤害
+gamerule fallDamage false
+
 # 生成地图
 
 #   111
@@ -19,9 +22,6 @@ setblock 1000 28 3022 minecraft:redstone_block
 setblock 1000 27 2999 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"?",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:23,posZ:0,integrity:1.0f,showair:0b,name:"mini:hotpm010",sizeY:24,sizeZ:23,showboundingbox:0b}
 setblock 1000 28 2999 minecraft:redstone_block
 
-# 关闭伤害
-gamerule fallDamage false
-
 #   101
 setblock 1023 4 3022 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"!",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:23,posZ:0,integrity:1.0f,showair:0b,name:"mini:hotpm101",sizeY:24,sizeZ:23,showboundingbox:0b}
 setblock 1023 5 3022 minecraft:redstone_block

+ 1 - 1
data/test/functions/start_hotpm.mcfunction

@@ -2,7 +2,7 @@
 
 tag @a remove watcher
 scoreboard players set $game_type mem 1
-scoreboard players set $round mem 3
+scoreboard players set $round mem 100
 scoreboard players set $mini_type mem 3
 function mini:main/game_init
 function ltw:state/4/state_enter

+ 1 - 1
data/test/functions/start_parkour.mcfunction

@@ -2,7 +2,7 @@
 
 tag @a remove watcher
 scoreboard players set $game_type mem 1
-scoreboard players set $round mem 3
+scoreboard players set $round mem 100
 scoreboard players set $mini_type mem 1
 function mini:main/game_init
 function ltw:state/4/state_enter

+ 1 - 1
data/test/functions/start_tntrun.mcfunction

@@ -2,7 +2,7 @@
 
 tag @a remove watcher
 scoreboard players set $game_type mem 1
-scoreboard players set $round mem 3
+scoreboard players set $round mem 100
 scoreboard players set $mini_type mem 2
 function mini:main/game_init
 function ltw:state/4/state_enter