LTCatt 5 anni fa
parent
commit
0bbb8d5445

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

@@ -6,7 +6,8 @@ title @s actionbar ""
 # 重置玩家血量上限
 attribute @s generic.max_health base set 20
 
-# 重置经验值
+# 重置经验值与配方
+recipe take @a *
 xp set @s 0 points
 xp set @s 0 levels
 

+ 2 - 1
data/mini/functions/diamond/game/respawn1.mcfunction

@@ -8,4 +8,5 @@ gamerule naturalRegeneration false
 
 # 传送玩家
 spreadplayers 1016 5016 6 8 under 255 false @s[team=playing,tag=!rejoining]
-schedule function mini:diamond/game/respawn2 1t
+tag @s add respawning
+schedule function mini:diamond/game/respawn2 1t append

+ 2 - 1
data/mini/functions/diamond/game/respawn2.mcfunction

@@ -1 +1,2 @@
-tp @s ~ 259 ~
+tp @a[tag=respawning] ~ 259 ~
+tag @a remove respawning

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

@@ -17,4 +17,5 @@ gamemode spectator @s[team=!debugging]
 gamemode survival @s[team=playing,tag=!rejoining]
 
 # 执行重生方法
+tag @s remove respawning
 function mini:diamond/game/respawn1

+ 1 - 2
data/mini/functions/diamond/tick20.mcfunction

@@ -9,6 +9,5 @@ execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds
 execute if score $countdown mem matches 0 run function mini:main/game_end
 
 # 回复生命值
-execute if score $twice mem matches 1 run effect give @a regeneration 1 10 true
+execute if score $twice mem matches 1 run effect give @a[team=playing] regeneration 1 10 true
 execute if score $twice mem matches 1 run schedule function mini:diamond/game/clear_effect 1t replace
-effect clear @a regeneration

+ 1 - 1
data/mini/functions/diamond/tick5.mcfunction

@@ -4,6 +4,6 @@ execute as @a[team=playing] store result score @s diamond run clear @s diamond 0
 effect give @a[scores={diamond=1..}] glowing 2 0 true
 
 # 显示提示
-execute as @a[scores={diamond=1..},tag=!diamond_got] run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了闪闪发光的钻石!"]
+execute as @a[scores={diamond=1..},tag=!diamond_got] run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s"},{"text":" 获得了闪闪发光的钻石!","color":"aqua"}]
 execute as @a[scores={diamond=1..},tag=!diamond_got] as @a[distance=1..] run function lib:sounds/hit
 tag @a[scores={diamond=1..},tag=!diamond_got] add diamond_got