Browse Source

自动解锁配方

LTCatt 5 years ago
parent
commit
e55cd3c25d

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

@@ -3,7 +3,7 @@ forceload add -32 -17 31 -80
 
 # 要求系统进入状态 0(等待大厅)
 scoreboard players set $state mem 0
-execute as @a run function ltw:state/0/player_enter
+execute as @a[team=!debugging] run function ltw:state/0/player_enter
 
 # HUD
 scoreboard objectives setdisplay belowName green_total

+ 2 - 1
data/ltw/functions/state/6/player_enter.mcfunction

@@ -26,4 +26,5 @@ gamemode spectator @s[team=!debugging]
 spectate
 
 # 清理物品
-clear @s #mini:game_item{game_item:1b}
+clear @s #mini:game_item{game_item:1b}
+recipe take @s *

+ 3 - 0
data/mini/functions/diamond/player_enter.mcfunction

@@ -3,6 +3,9 @@ function lib:sounds/music/mini_slow
 title @s clear
 title @s actionbar ""
 
+# 解锁配方
+recipe give @s *
+
 # 设置玩家生命
 attribute @s generic.max_health base set 20
 

+ 1 - 0
data/mini/functions/main/player_enter.mcfunction

@@ -8,6 +8,7 @@ scoreboard players set @s[team=watching] mini_score -1000000
 function mini:main/update_player_count
 
 clear @s #mini:game_item{game_item:1b}
+recipe take @s *
 
 execute if score $mini_type mem matches 1 run function mini:parkour/player_enter
 execute if score $mini_type mem matches 2 run function mini:tntrun/player_enter