Kaynağa Gözat

修复金苹果bug

HerobrineXia 6 yıl önce
ebeveyn
işleme
96aad7778e

+ 1 - 1
data/item/functions/special/enchanted_apple.mcfunction

@@ -3,7 +3,7 @@ advancement revoke @s only item:special/consume_enchanted_apple
 
 # 计算生命值
 execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run scoreboard players operation @s mini_heart += @s mini_heart
-execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run function mini:/player_max_health
+execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run function mini:main/player_max_health
 # 去除buff
 execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run tag @s add consume_apple
 schedule function item:special/clear_effect 1t replace

+ 1 - 1
data/item/functions/special/golden_apple.mcfunction

@@ -3,7 +3,7 @@ advancement revoke @s only item:special/consume_golden_apple
 
 # 计算生命值
 execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run scoreboard players add @s mini_heart 1
-execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run function mini:/player_max_health
+execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run function mini:main/player_max_health
 
 # 去除buff
 execute if score $state mem matches 1.. if score @s mini_heart matches 1.. run tag @s add consume_apple

+ 1 - 1
data/mini/functions/main/player_max_health.mcfunction

@@ -1,6 +1,6 @@
 # 如小游戏有多条命,需在小游戏中设置给玩家mini_heart生命上限并调用此函数
 # 设置生命值上限
-execute if score @s mini_heart matches 13.. run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},"小游戏生命值上限是12哦,请不要太贪心!"]
+execute if score @s mini_heart matches 13.. run tellraw @s ["",{"text": ">> ","color":"gold","bold": true},"小游戏生命值上限是12哦,请不要太贪心!"]
 execute if score @s mini_heart matches 13.. run scoreboard players set @s mini_heart 12
 
 # 根据玩家mini_heart数量决定生命值上限