Bläddra i källkod

优化小游戏文件结构与命名规范

LTCatt 6 år sedan
förälder
incheckning
5279d0f9cc
61 ändrade filer med 61 tillägg och 126 borttagningar
  1. 1 1
      data/lib/advancements/damage_dealt.json
  2. 1 1
      data/lib/advancements/damage_taken.json
  3. 0 2
      data/ltw/functions/main/player_enter_rejoin.mcfunction
  4. 1 1
      data/ltw/functions/state/3/state_enter.mcfunction
  5. 1 1
      data/ltw/functions/state/4/player_enter.mcfunction
  6. 1 1
      data/ltw/functions/state/4/tick4.mcfunction
  7. 1 1
      data/ltw/functions/state/5/tick4.mcfunction
  8. 1 1
      data/ltw/functions/state/6/tick4.mcfunction
  9. 2 0
      data/ltw/functions/state/7/player_enter.mcfunction
  10. 1 1
      data/mini/advancements/hotpm/damage_dealt.json
  11. 1 1
      data/mini/advancements/hotpm/damage_taken.json
  12. 1 1
      data/mini/functions/colormatch/game/generate_floor.mcfunction
  13. 1 1
      data/mini/functions/colormatch/game/generate_parts.mcfunction
  14. 0 0
      data/mini/functions/colormatch/game/get_random_floor.mcfunction
  15. 5 0
      data/mini/functions/colormatch/game/prepare_round.mcfunction
  16. 1 1
      data/mini/functions/colormatch/game/remove_ground.mcfunction
  17. 0 0
      data/mini/functions/colormatch/game/replace_wall.mcfunction
  18. 2 2
      data/mini/functions/colormatch/game/start_new_round.mcfunction
  19. 1 1
      data/mini/functions/colormatch/game_end.mcfunction
  20. 1 1
      data/mini/functions/colormatch/game_start.mcfunction
  21. 2 2
      data/mini/functions/colormatch/map_init.mcfunction
  22. 1 1
      data/mini/functions/colormatch/map_init2.mcfunction
  23. 1 1
      data/mini/functions/colormatch/player_failed.mcfunction
  24. 0 3
      data/mini/functions/colormatch/player_intro.mcfunction
  25. 0 5
      data/mini/functions/colormatch/prepare_round.mcfunction
  26. 0 61
      data/mini/functions/colormatch/show_block_amount.mcfunction
  27. 2 2
      data/mini/functions/colormatch/tick20.mcfunction
  28. 3 0
      data/mini/functions/colormatch/watcher_intro.mcfunction
  29. 0 0
      data/mini/functions/colormatch/watcher_limit.mcfunction
  30. 2 2
      data/mini/functions/hotpm/game/damage_dealt.mcfunction
  31. 2 2
      data/mini/functions/hotpm/game/damage_dealt2.mcfunction
  32. 1 1
      data/mini/functions/hotpm/game/damage_taken.mcfunction
  33. 2 2
      data/mini/functions/hotpm/game/pm_boom.mcfunction
  34. 0 0
      data/mini/functions/hotpm/game/pm_get.mcfunction
  35. 1 1
      data/mini/functions/hotpm/game/pm_init.mcfunction
  36. 2 0
      data/mini/functions/hotpm/game/pm_init_first.mcfunction
  37. 0 0
      data/mini/functions/hotpm/game/pm_lost.mcfunction
  38. 1 1
      data/mini/functions/hotpm/game_start.mcfunction
  39. 0 1
      data/mini/functions/hotpm/init.mcfunction
  40. 0 0
      data/mini/functions/hotpm/map_init.mcfunction
  41. 0 2
      data/mini/functions/hotpm/pm_init_first.mcfunction
  42. 1 1
      data/mini/functions/hotpm/tick20.mcfunction
  43. 0 0
      data/mini/functions/hotpm/watcher_intro.mcfunction
  44. 0 0
      data/mini/functions/hotpm/watcher_limit.mcfunction
  45. 0 2
      data/mini/functions/main/init.mcfunction
  46. 4 4
      data/mini/functions/main/map_init.mcfunction
  47. 4 4
      data/mini/functions/main/watcher_intro.mcfunction
  48. 4 4
      data/mini/functions/main/watcher_limit.mcfunction
  49. 0 1
      data/mini/functions/parkour/init.mcfunction
  50. 0 0
      data/mini/functions/parkour/map_init.mcfunction
  51. 0 0
      data/mini/functions/parkour/watcher_intro.mcfunction
  52. 0 0
      data/mini/functions/parkour/watcher_limit.mcfunction
  53. 0 0
      data/mini/functions/tntrun/game/check_floor.mcfunction
  54. 0 0
      data/mini/functions/tntrun/map_init.mcfunction
  55. 1 1
      data/mini/functions/tntrun/tick1.mcfunction
  56. 0 0
      data/mini/functions/tntrun/watcher_intro.mcfunction
  57. 0 0
      data/mini/functions/tntrun/watcher_limit.mcfunction
  58. 1 1
      data/test/functions/start_colormatch.mcfunction
  59. 1 1
      data/test/functions/start_hotpm.mcfunction
  60. 1 1
      data/test/functions/start_parkour.mcfunction
  61. 1 1
      data/test/functions/start_tntrun.mcfunction

+ 1 - 1
data/lib/advancements/damage_dealt.json

@@ -12,6 +12,6 @@
         }
     },
     "rewards": {
-        "function": "lib:damage_indicator/damage_dealt"
+        "function": "lib:damage_indicator/game/damage_dealt"
     }
 }

+ 1 - 1
data/lib/advancements/damage_taken.json

@@ -12,6 +12,6 @@
         }
     },
     "rewards": {
-        "function": "lib:damage_indicator/damage_taken"
+        "function": "lib:damage_indicator/game/damage_taken"
     }
 }

+ 0 - 2
data/ltw/functions/main/player_enter_rejoin.mcfunction

@@ -16,5 +16,3 @@ execute if score $state mem matches 5 run function ltw:state/5/player_enter
 execute if score $state mem matches 6 run function ltw:state/6/player_enter
 execute if score $state mem matches 7 run function ltw:state/7/player_enter
 tag @s remove rejoining
-
-# TODO : 如果玩家在奖励选择阶段重连,玩家应该跳过此次奖励选择

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

@@ -17,4 +17,4 @@ execute store result score $mini_type mem run data get storage ltw:mini types[0]
 data remove storage ltw:mini types[0]
 
 # 初始化小游戏
-function mini:main/game_init
+function mini:main/map_init

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

@@ -9,7 +9,7 @@ effect give @s instant_health 10 0 true
 effect give @s night_vision 1000000 0 true
 
 # 显示小游戏介绍
-function mini:main/player_intro
+function mini:main/watcher_intro
 
 # 自由旁观
 gamemode spectator

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

@@ -1 +1 @@
-function mini:main/spectator_range
+function mini:main/watcher_limit

+ 1 - 1
data/ltw/functions/state/5/tick4.mcfunction

@@ -1,2 +1,2 @@
 function mini:main/tick4
-function mini:main/spectator_range
+function mini:main/watcher_limit

+ 1 - 1
data/ltw/functions/state/6/tick4.mcfunction

@@ -1 +1 @@
-function mini:main/spectator_range
+function mini:main/watcher_limit

+ 2 - 0
data/ltw/functions/state/7/player_enter.mcfunction

@@ -15,3 +15,5 @@ tp @s 7.0 11.4 2007.0 0 0
 # 自由旁观
 gamemode spectator
 spectate
+
+# 如果玩家在奖励选择阶段重连,玩家应该跳过此次奖励选择

+ 1 - 1
data/mini/advancements/hotpm/damage_dealt.json

@@ -12,6 +12,6 @@
         }
     },
     "rewards": {
-        "function": "mini:hotpm/damage_dealt"
+        "function": "mini:hotpm/game/damage_dealt"
     }
 }

+ 1 - 1
data/mini/advancements/hotpm/damage_taken.json

@@ -12,6 +12,6 @@
         }
     },
     "rewards": {
-        "function": "mini:hotpm/damage_taken"
+        "function": "mini:hotpm/game/damage_taken"
     }
 }

+ 1 - 1
data/mini/functions/colormatch/generate_floor.mcfunction → data/mini/functions/colormatch/game/generate_floor.mcfunction

@@ -2,4 +2,4 @@
 scoreboard players set $floor_generate_part mem 0
 
 # 调用地板生成
-function mini:colormatch/generate_parts
+function mini:colormatch/game/generate_parts

+ 1 - 1
data/mini/functions/colormatch/generate_parts.mcfunction → data/mini/functions/colormatch/game/generate_parts.mcfunction

@@ -29,4 +29,4 @@ execute if score $floor_generate_part mem matches 25 positioned 1000 10 4000 run
 setblock 1000 9 4000 redstone_block
 setblock 1000 9 4000 air
 setblock 1000 10 4000 air
-execute if score $floor_generate_part mem matches 1..24 run schedule function mini:colormatch/generate_parts 1t replace
+execute if score $floor_generate_part mem matches 1..24 run schedule function mini:colormatch/game/generate_parts 1t replace

+ 0 - 0
data/mini/functions/colormatch/get_random_floor.mcfunction → data/mini/functions/colormatch/game/get_random_floor.mcfunction


+ 5 - 0
data/mini/functions/colormatch/game/prepare_round.mcfunction

@@ -0,0 +1,5 @@
+# 刷新地板
+function mini:colormatch/game/generate_floor
+
+# 获取保留地板
+schedule function mini:colormatch/game/get_random_floor 26t replace

+ 1 - 1
data/mini/functions/colormatch/remove_ground.mcfunction → data/mini/functions/colormatch/game/remove_ground.mcfunction

@@ -8,4 +8,4 @@ scoreboard players set $countdown mem 3
 scoreboard players set $color_match_type mem 1
 
 # 预备下一轮
-function mini:colormatch/prepare_round
+function mini:colormatch/game/prepare_round

+ 0 - 0
data/mini/functions/colormatch/replace_wall.mcfunction → data/mini/functions/colormatch/game/replace_wall.mcfunction


+ 2 - 2
data/mini/functions/colormatch/start_new_round.mcfunction → data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -1,5 +1,5 @@
 # 替换墙壁
-function mini:colormatch/replace_wall
+function mini:colormatch/game/replace_wall
 # 复制地板
 execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 
@@ -18,6 +18,6 @@ scoreboard players set $color_match_type mem 0
 execute as @a[tag=color_match_fall] at @s run tp @s ~ 20 ~
 tag @a[tag=color_match_fall] remove color_match_fall
 
-# TODO 告知玩家是啥方块
+# 龙猫:我觉得没必要告知玩家是啥方块,看墙壁就够了……
 # 告知玩家
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"新的一轮开始了!","color":"white","bold": false}]

+ 1 - 1
data/mini/functions/colormatch/game_end.mcfunction

@@ -1,4 +1,4 @@
-# 结束 TNT Run
+# 当前游戏结束时触发
 forceload remove 1001 4000 1075 4025
 
 # 移除tag

+ 1 - 1
data/mini/functions/colormatch/game_start.mcfunction

@@ -1,2 +1,2 @@
 # 开始轮次
-function mini:colormatch/start_new_round
+function mini:colormatch/game/start_new_round

+ 2 - 2
data/mini/functions/colormatch/game_init.mcfunction → data/mini/functions/colormatch/map_init.mcfunction

@@ -17,8 +17,8 @@ scoreboard players set $color_match_time mem 10
 scoreboard players set $color_match_type mem 0
 
 # 刷新地基
-function mini:colormatch/prepare_round
-schedule function mini:colormatch/game_init2 28t replace
+function mini:colormatch/game/prepare_round
+schedule function mini:colormatch/map_init2 28t replace
 
 # 关闭伤害
 gamerule fallDamage false

+ 1 - 1
data/mini/functions/colormatch/game_init2.mcfunction → data/mini/functions/colormatch/map_init2.mcfunction

@@ -1,4 +1,4 @@
 # 替换墙壁
-function mini:colormatch/replace_wall
+function mini:colormatch/game/replace_wall
 # 复制地板
 execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000

+ 1 - 1
data/mini/functions/colormatch/player_failed.mcfunction

@@ -4,6 +4,6 @@ tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@s","color":
 # 失去一颗心
 function mini:main/player_lose_heart
 
-# 给与本轮无敌
+# 给予本轮无敌
 execute if entity @s[tag=mini_running] run tp @s ~ 35 ~
 execute if entity @s[tag=mini_running] run tag @s add color_match_fall

+ 0 - 3
data/mini/functions/colormatch/player_intro.mcfunction

@@ -1,3 +0,0 @@
-# 向单个玩家展示小游戏介绍
-tp @s 1062 30 4012 0 180
-tellraw @s [{"text":"\n>> 陷阱迷阵 >>\n\n","color":"red","bold":true},{"text": "墙壁上会显示本轮的安全歇脚方块\n在倒计时结束前跑上去躲避陷阱!\n","color":"white","bold": false}]

+ 0 - 5
data/mini/functions/colormatch/prepare_round.mcfunction

@@ -1,5 +0,0 @@
-# 刷新地板
-function mini:colormatch/generate_floor
-
-# 获取保留地板
-schedule function mini:colormatch/get_random_floor 26t replace

+ 0 - 61
data/mini/functions/colormatch/show_block_amount.mcfunction

@@ -1,61 +0,0 @@
-# 创建计分板
-scoreboard objectives add block_count dummy
-
-# 获取分数
-tellraw @a [{"text":"本轮方块列表:","color":"gold"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered iron_block
-tellraw @a [{"text":"iron_block数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered white_concrete
-tellraw @a [{"text":"white_concrete数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered quartz_block
-tellraw @a [{"text":"quartz_block数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered snow_block
-tellraw @a [{"text":"snow_block数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered white_wool
-tellraw @a [{"text":"white_wool数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered gold_block
-tellraw @a [{"text":"gold_block数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered sponge
-tellraw @a [{"text":"sponge数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered sandstone
-tellraw @a [{"text":"sandstone数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered yellow_concrete
-tellraw @a [{"text":"yellow_concrete数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered end_stone
-tellraw @a [{"text":"end_stone数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered emerald_block
-tellraw @a [{"text":"emerald_block数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered lime_concrete
-tellraw @a [{"text":"lime_concrete数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered melon
-tellraw @a [{"text":"melon数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered dark_prismarine
-tellraw @a [{"text":"dark_prismarine数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered green_wool
-tellraw @a [{"text":"green_wool数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered diamond_block
-tellraw @a [{"text":"diamond_block数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered prismarine
-tellraw @a [{"text":"prismarine数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered blue_ice
-tellraw @a [{"text":"blue_ice数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered warped_wart_block
-tellraw @a [{"text":"warped_wart_block数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered prismarine_bricks
-tellraw @a [{"text":"prismarine_bricks数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered red_wool
-tellraw @a [{"text":"red_wool数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered red_concrete
-tellraw @a [{"text":"red_concrete数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered netherrack
-tellraw @a [{"text":"netherrack数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered red_nether_bricks
-tellraw @a [{"text":"red_nether_bricks数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-execute store result score block_count block_count positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered bricks
-tellraw @a [{"text":"bricks数量: ","color":"green"},{"score": {"objective": "block_count","name": "block_count"},"color":"white"}]
-
-# 删除方块
-execute positioned 1001 10 4000 run fill ~ ~1 ~ ~24 ~1 ~24 air replace
-
-# 删除计分板
-scoreboard objectives remove block_count

+ 2 - 2
data/mini/functions/colormatch/tick20.mcfunction

@@ -1,7 +1,7 @@
 # 每秒函数
 # 开新的一轮
-execute if score $countdown mem matches 0 if score $color_match_type mem matches 0 run function mini:colormatch/remove_ground
-execute if score $countdown mem matches 0 if score $color_match_type mem matches 1 run function mini:colormatch/start_new_round
+execute if score $countdown mem matches 0 if score $color_match_type mem matches 0 run function mini:colormatch/game/remove_ground
+execute if score $countdown mem matches 0 if score $color_match_type mem matches 1 run function mini:colormatch/game/start_new_round
 
 # 显示当前剩余秒数
 execute if score $countdown mem matches 1.. if score $color_match_type mem matches 0 run title @a actionbar [{"text":"距离地板消失: ","color":"red","bold": true},{"score": { "name": "$countdown","objective": "mem"}}]

+ 3 - 0
data/mini/functions/colormatch/watcher_intro.mcfunction

@@ -0,0 +1,3 @@
+# 向单个玩家展示小游戏介绍
+tp @s 1062 30 4012 0 180
+tellraw @s [{"text":"\n>> 陷阱迷阵 >>\n\n","color":"red","bold":true},{"text": "墙壁上会显示安全的歇脚方块,\n在倒计时结束前跑到它们上面以躲避陷阱!\n","color":"white","bold": false}]

+ 0 - 0
data/mini/functions/colormatch/spectator_range.mcfunction → data/mini/functions/colormatch/watcher_limit.mcfunction


+ 2 - 2
data/mini/functions/hotpm/damage_dealt.mcfunction → data/mini/functions/hotpm/game/damage_dealt.mcfunction

@@ -1,8 +1,8 @@
 # 造成伤害时由玩家触发
-advancement revoke @s only mini:hotpm/damage_dealt
+advancement revoke @s only mini:hotpm/game/damage_dealt
 
 # 如果是土豆持有者在热土豆游戏中打到人,才执行下一步
-execute as @s[tag=pm_hoding] at @s if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/damage_dealt2
+execute as @s[tag=pm_hoding] at @s if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/game/damage_dealt2
 
 # 结束伤害判断
 tag @a remove pm_damage_dealt

+ 2 - 2
data/mini/functions/hotpm/damage_dealt2.mcfunction → data/mini/functions/hotpm/game/damage_dealt2.mcfunction

@@ -4,6 +4,6 @@ tag @s add pm_damage_dealt
 playsound minecraft:entity.arrow.hit_player ambient @s ~ ~ ~ 1 1 1
 
 # 转移土豆
-function mini:hotpm/pm_lost
-execute as @p[tag=pm_damage_taken,tag=!pm_damage_dealt] run function mini:hotpm/pm_get
+function mini:hotpm/game/pm_lost
+execute as @p[tag=pm_damage_taken,tag=!pm_damage_dealt] run function mini:hotpm/game/pm_get
 tellraw @a [{"text":">> ","color":"gold","bold":true},{"selector":"@s","color":"yellow","bold":false},{"text":" 将土豆拍在了 ","color":"white","bold":false},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 的脸上!","color":"white","bold":false}]

+ 1 - 1
data/mini/functions/hotpm/damage_taken.mcfunction → data/mini/functions/hotpm/game/damage_taken.mcfunction

@@ -1,5 +1,5 @@
 # 受到伤害时由玩家触发
-advancement revoke @s only mini:hotpm/damage_taken
+advancement revoke @s only mini:hotpm/game/damage_taken
 
 # 添加受伤 Tag
 execute if score $state mem matches 5 if score $mini_type mem matches 3 run tag @s add pm_damage_taken

+ 2 - 2
data/mini/functions/hotpm/pm_boom.mcfunction → data/mini/functions/hotpm/game/pm_boom.mcfunction

@@ -1,5 +1,5 @@
 #玩家失败
-function mini:hotpm/pm_lost
+function mini:hotpm/game/pm_lost
 # 告知玩家
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@s","color":"yellow","bold": false},{"text":" 爆炸了!","color":"white","bold": false}]
 #记录位置
@@ -7,4 +7,4 @@ execute at @s run summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["pm_boom"]}
 #减少生命
 function mini:hotpm/player_failed
 #选新土豆
-execute if score $alive mem matches 2.. as @e[type=area_effect_cloud,tag=pm_boom] run function mini:hotpm/pm_init
+execute if score $alive mem matches 2.. as @e[type=area_effect_cloud,tag=pm_boom] run function mini:hotpm/game/pm_init

+ 0 - 0
data/mini/functions/hotpm/pm_get.mcfunction → data/mini/functions/hotpm/game/pm_get.mcfunction


+ 1 - 1
data/mini/functions/hotpm/pm_init.mcfunction → data/mini/functions/hotpm/game/pm_init.mcfunction

@@ -1,5 +1,5 @@
 # 将土豆刷新给离自己最远的人
-execute at @s as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/pm_get
+execute at @s as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/game/pm_get
 
 # 告知玩家
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]

+ 2 - 0
data/mini/functions/hotpm/game/pm_init_first.mcfunction

@@ -0,0 +1,2 @@
+#第一次初始化土豆
+execute as @r[tag=mini_running] run function mini:hotpm/game/pm_init

+ 0 - 0
data/mini/functions/hotpm/pm_lost.mcfunction → data/mini/functions/hotpm/game/pm_lost.mcfunction


+ 1 - 1
data/mini/functions/hotpm/game_start.mcfunction

@@ -1,2 +1,2 @@
 # 3秒后给予土豆
-schedule function mini:hotpm/pm_init_first 3s replace
+schedule function mini:hotpm/game/game/pm_init_first 3s replace

+ 0 - 1
data/mini/functions/hotpm/init.mcfunction

@@ -1 +0,0 @@
-# 似乎这个也不需要初始化什么

+ 0 - 0
data/mini/functions/hotpm/game_init.mcfunction → data/mini/functions/hotpm/map_init.mcfunction


+ 0 - 2
data/mini/functions/hotpm/pm_init_first.mcfunction

@@ -1,2 +0,0 @@
-#第一次初始化土豆
-execute as @r[tag=mini_running] run function mini:hotpm/pm_init

+ 1 - 1
data/mini/functions/hotpm/tick20.mcfunction

@@ -5,4 +5,4 @@ execute if score $countdown mem matches 1.. run title @a actionbar [{"text":"土
 execute as @a[tag=pm_hoding] at @s run playsound minecraft:entity.creeper.primed player @s
 
 # 爆炸
-execute if score $countdown mem matches 0 as @a[tag=pm_hoding] run function mini:hotpm/pm_boom
+execute if score $countdown mem matches 0 as @a[tag=pm_hoding] run function mini:hotpm/game/pm_boom

+ 0 - 0
data/mini/functions/hotpm/player_intro.mcfunction → data/mini/functions/hotpm/watcher_intro.mcfunction


+ 0 - 0
data/mini/functions/hotpm/spectator_range.mcfunction → data/mini/functions/hotpm/watcher_limit.mcfunction


+ 0 - 2
data/mini/functions/main/init.mcfunction

@@ -1,7 +1,5 @@
 # 初始化
 function mini:tntrun/init
-function mini:parkour/init
-function mini:hotpm/init
 function mini:colormatch/init
 
 # 计分板初始化

+ 4 - 4
data/mini/functions/main/game_init.mcfunction → data/mini/functions/main/map_init.mcfunction

@@ -3,10 +3,10 @@ scoreboard players reset * mini_score
 scoreboard players reset * mini_heart
 
 # 小游戏初始化
-execute if score $mini_type mem matches 1 run function mini:parkour/game_init
-execute if score $mini_type mem matches 2 run function mini:tntrun/game_init
-execute if score $mini_type mem matches 3 run function mini:hotpm/game_init
-execute if score $mini_type mem matches 4 run function mini:colormatch/game_init
+execute if score $mini_type mem matches 1 run function mini:parkour/map_init
+execute if score $mini_type mem matches 2 run function mini:tntrun/map_init
+execute if score $mini_type mem matches 3 run function mini:hotpm/map_init
+execute if score $mini_type mem matches 4 run function mini:colormatch/map_init
 
 # 计算玩家数量
 execute store result score $alive mem if entity @a[tag=mini_running,tag=!watcher]

+ 4 - 4
data/mini/functions/main/player_intro.mcfunction → data/mini/functions/main/watcher_intro.mcfunction

@@ -1,5 +1,5 @@
 # 向单个玩家展示小游戏时执行
-execute if score $mini_type mem matches 1 run function mini:parkour/player_intro
-execute if score $mini_type mem matches 2 run function mini:tntrun/player_intro
-execute if score $mini_type mem matches 3 run function mini:hotpm/player_intro
-execute if score $mini_type mem matches 4 run function mini:colormatch/player_intro
+execute if score $mini_type mem matches 1 run function mini:parkour/watcher_intro
+execute if score $mini_type mem matches 2 run function mini:tntrun/watcher_intro
+execute if score $mini_type mem matches 3 run function mini:hotpm/watcher_intro
+execute if score $mini_type mem matches 4 run function mini:colormatch/watcher_intro

+ 4 - 4
data/mini/functions/main/spectator_range.mcfunction → data/mini/functions/main/watcher_limit.mcfunction

@@ -1,5 +1,5 @@
 # 限制观察者范围
-execute if score $mini_type mem matches 1 run function mini:parkour/spectator_range
-execute if score $mini_type mem matches 2 run function mini:tntrun/spectator_range
-execute if score $mini_type mem matches 3 run function mini:hotpm/spectator_range
-execute if score $mini_type mem matches 4 run function mini:colormatch/spectator_range
+execute if score $mini_type mem matches 1 run function mini:parkour/watcher_limit
+execute if score $mini_type mem matches 2 run function mini:tntrun/watcher_limit
+execute if score $mini_type mem matches 3 run function mini:hotpm/watcher_limit
+execute if score $mini_type mem matches 4 run function mini:colormatch/watcher_limit

+ 0 - 1
data/mini/functions/parkour/init.mcfunction

@@ -1 +0,0 @@
-# 跑酷没有用到记分板,不需要初始化

+ 0 - 0
data/mini/functions/parkour/game_init.mcfunction → data/mini/functions/parkour/map_init.mcfunction


+ 0 - 0
data/mini/functions/parkour/player_intro.mcfunction → data/mini/functions/parkour/watcher_intro.mcfunction


+ 0 - 0
data/mini/functions/parkour/spectator_range.mcfunction → data/mini/functions/parkour/watcher_limit.mcfunction


+ 0 - 0
data/mini/functions/tntrun/check_floor.mcfunction → data/mini/functions/tntrun/game/check_floor.mcfunction


+ 0 - 0
data/mini/functions/tntrun/game_init.mcfunction → data/mini/functions/tntrun/map_init.mcfunction


+ 1 - 1
data/mini/functions/tntrun/tick1.mcfunction

@@ -1,5 +1,5 @@
 # 检测应该消失的方块
-execute as @a[tag=tntrun_pc,nbt={OnGround:1b}] at @s positioned ~ ~-1 ~ run function mini:tntrun/check_floor
+execute as @a[tag=tntrun_pc,nbt={OnGround:1b}] at @s positioned ~ ~-1 ~ run function mini:tntrun/game/check_floor
 
 # 修改下面这一行的数字以调整方块消失的延迟(刻)
 # tntrun_timer=12

+ 0 - 0
data/mini/functions/tntrun/player_intro.mcfunction → data/mini/functions/tntrun/watcher_intro.mcfunction


+ 0 - 0
data/mini/functions/tntrun/spectator_range.mcfunction → data/mini/functions/tntrun/watcher_limit.mcfunction


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

@@ -3,7 +3,7 @@ tag @a remove watcher
 function ltw:state/0/start_gameparty
 scoreboard players set $round mem 100
 scoreboard players set $mini_type mem 4
-function mini:main/game_init
+function mini:main/map_init
 function ltw:state/4/state_enter
 scoreboard players set $countdown mem 5
 say 已开始陷阱迷阵!

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

@@ -4,7 +4,7 @@ tag @a remove watcher
 function ltw:state/0/start_gameparty
 scoreboard players set $round mem 100
 scoreboard players set $mini_type mem 3
-function mini:main/game_init
+function mini:main/map_init
 function ltw:state/4/state_enter
 scoreboard players set $countdown mem 5
 say 已开始热土豆!

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

@@ -4,7 +4,7 @@ tag @a remove watcher
 function ltw:state/0/start_gameparty
 scoreboard players set $round mem 100
 scoreboard players set $mini_type mem 1
-function mini:main/game_init
+function mini:main/map_init
 function ltw:state/4/state_enter
 scoreboard players set $countdown mem 5
 say 已开始跑酷!

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

@@ -4,7 +4,7 @@ tag @a remove watcher
 function ltw:state/0/start_gameparty
 scoreboard players set $round mem 100
 scoreboard players set $mini_type mem 2
-function mini:main/game_init
+function mini:main/map_init
 function ltw:state/4/state_enter
 scoreboard players set $countdown mem 5
 say 已开始 TNT Run!