LTCatt 6 лет назад
Родитель
Сommit
9bc84f5f81

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

@@ -1,7 +1,7 @@
 # 切换为经典模式
 execute if score $game_type mem matches 1 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},"游戏模式已切换为 ",{"text": "经典模式","color":"aqua"}]
+execute if score $game_type mem matches 1 as @a at @s run function lib:sounds/teleport
 scoreboard players set $game_type mem 0
-execute as @a at @s run function lib:sounds/teleport
 function ltw:state/0/refresh_game_type
 
 # 取消倒计时

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

@@ -1,7 +1,7 @@
 # 切换为小游戏模式
 execute if score $game_type mem matches 0 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},"游戏模式已切换为 ",{"text": "小游戏模式","color":"aqua"}]
+execute if score $game_type mem matches 0 as @a at @s run function lib:sounds/teleport
 scoreboard players set $game_type mem 1
-execute as @a at @s run function lib:sounds/teleport
 function ltw:state/0/refresh_game_type
 
 # 取消倒计时

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

@@ -9,6 +9,10 @@ clear @s
 # 重置玩家血量上限
 attribute @s generic.max_health base set 20
 
+# 重置经验值
+xp set @s 0 points
+xp set @s 0 levels
+
 # 状态效果
 effect clear @s
 effect give @s saturation 1000000 0 true