fz-survival-datapack/data/fz/functions/game_event/player/on_broke_block.mcfunction

40 lines
3.4 KiB
Mcfunction
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 调用者fz:game_event/player/on_used_tool
## 调试
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "挖掘了方块"}]
## 收集挖掘数据
scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.used_tool.diamond_axe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_hoe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_pickaxe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_shovel
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_sword
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_axe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_hoe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_pickaxe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_shovel
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_sword
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_axe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_hoe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_pickaxe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_shovel
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_sword
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_axe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_hoe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_pickaxe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_shovel
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_sword
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.shears
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_axe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_hoe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_pickaxe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_shovel
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_sword
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_axe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_hoe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_pickaxe
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_shovel
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_sword
## 运行事件
function #fz:game_event/player/on_broke_block