fz-survival-datapack/data/fz/functions/module/scoreboard/load.mcfunction

25 lines
3.8 KiB
Mcfunction
Raw Normal View History

2022-06-23 15:43:39 +08:00
# 调用者:#fz:module/scoreboard/load
## 异常检测
execute unless data storage fz:install_manager fz.module{scoreboard: 1b} if score fz.logger.level fz.variable.integer matches ..800 run tellraw @a [{"nbt": "fz.exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
2022-06-23 15:43:39 +08:00
## 设置颜色和名称
function #fz:module/scoreboard/display/set_text/set_all
## 调试
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "计分板显示文本已设为:"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.general - "}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.activation - "}, {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.aviating_distance - "}, {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.damage_taken - "}, {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.death_count - "}, {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.dig_count - "}, {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.fishing_count - "}, {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.kill_count - "}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}]
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.trade_count - "}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}]
2022-06-23 15:43:39 +08:00
## 开启轮播循环
function fz:module/scoreboard/display/carousel_controller/loop
## 日志
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已加载组件:计分板"}]