18 lines
834 B
Mcfunction
18 lines
834 B
Mcfunction
# 调用者:advancements/fz:~
|
||
|
||
## 详细
|
||
execute if score fz.logger.level fz.variable.integer matches ..400 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 |