fz-survival-datapack/data/fz/functions/game_event/player/on_used_tool.mcfunction
2022-07-11 15:40:55 +08:00

18 lines
834 B
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.

# 调用者advancements/fz:~
## 详细
execute if score fz.logger.level fz.variable.integer matches ..300 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了工具"}]
## 运行事件
function #fz:game_event/player/on_used_tool
## 判断并触发挖掘事件
### 挖掘偏移量可以被fz:game_event/[on_tools_used_on_block, on_shears_used_on_entity, on_hurt_entity_with_tools]改变
### 用于忽略非挖掘事件造成的工具使用分数
execute unless score @s fz.event.used_tool.offset matches ..-1 run function fz:game_event/player/on_broke_block
## 重置事件计分板
function #fz:game_event/player/on_used_tool/reset_used_tool
## 重置事件进度
advancement revoke @s only fz:game_event/on_used_tool