support mc1.21;需要放弃支持mc1.20
This commit is contained in:
parent
61a9f25505
commit
d81d0a530a
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -37,5 +37,5 @@
|
||||
"after": 1
|
||||
},
|
||||
"datapack.env.cmdVersion": "1.20.3",
|
||||
"datapack.env.dataVersion": "1.20.6"
|
||||
"datapack.env.dataVersion": "1.21"
|
||||
}
|
||||
|
20
README.md
20
README.md
@ -9,7 +9,7 @@
|
||||
## 安装教程
|
||||
|
||||
1. 兼容性
|
||||
- `数据包 v3.1.x` 支持 `Minecraft 1.20.x`
|
||||
- `数据包 v3.1.x` 支持 `Minecraft 1.20-1.21`
|
||||
- `数据包 v3.0.x` 支持 `Minecraft 1.18.2-1.19.x` (不再维护)
|
||||
2. 前往[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)下载对应MC版本的数据包
|
||||
3. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
||||
@ -28,9 +28,9 @@
|
||||
|
||||
- 提供下列计分板:
|
||||
|
||||
| 默认名称 | 计分板ID |
|
||||
| 默认名称 | 计分板 ID |
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 总榜 | fzsd.module.scoreboard.display.general |
|
||||
| 总览 | fzsd.module.scoreboard.display.general |
|
||||
| 活跃度 | fzsd.module.scoreboard.display.activation |
|
||||
| 飞行距离 | fzsd.module.scoreboard.display.aviating_distance |
|
||||
| 抖M榜 | fzsd.module.scoreboard.display.damage_taken |
|
||||
@ -44,25 +44,25 @@
|
||||
- 兼容[破基岩榜Mod](https://gitee.com/harvey-husky/yh-bbl)
|
||||
- 安装该Mod后,使用连点器破基岩,破基岩榜将自动显示在交互器页面
|
||||
|
||||
| 默认名称 | 计分板ID |
|
||||
| 默认名称 | 计分板 ID |
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 破基岩榜 |fzsd.module.scoreboard.display.bedrock_broken_count|
|
||||
|
||||
- 系统总榜计分板:`fzsd.module.scoreboard.assign.general`
|
||||
- 系统总览计分板:`fzsd.module.scoreboard.assign.general`
|
||||
- 可以在在此记分板修改总分数据,下次加分时会刷新显示分数
|
||||
- 总计分项名称对照表:
|
||||
|
||||
| 默认名称 | 计分板ID |
|
||||
| 默认名称 | player ID |
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 总活跃时间 | fzsd.module.scoreboard.total.activation |
|
||||
| 总飞行距离 | fzsd.module.scoreboard.total.aviating_distance |
|
||||
| 总受伤害量 | fzsd.module.scoreboard.total.damage_taken |
|
||||
| 总受伤害数 | fzsd.module.scoreboard.total.damage_taken |
|
||||
| 总死亡数 | fzsd.module.scoreboard.total.death_count |
|
||||
| 总挖掘量 | fzsd.module.scoreboard.total.dig_count |
|
||||
| 总挖掘数 | fzsd.module.scoreboard.total.dig_count |
|
||||
| 总钓鱼数 | fzsd.module.scoreboard.total.fishing_count |
|
||||
| 总击杀数 | fzsd.module.scoreboard.total.kill_count |
|
||||
| 总放置方块数 | fzsd.module.scoreboard.total.placement_count |
|
||||
| 总交易量 | fzsd.module.scoreboard.total.trade_count |
|
||||
| 总建造数 | fzsd.module.scoreboard.total.placement_count |
|
||||
| 总交易数 | fzsd.module.scoreboard.total.trade_count |
|
||||
|
||||
### 地毯脚本
|
||||
|
||||
|
40
data/admin.fzsd/function/admin.mcfunction
Normal file
40
data/admin.fzsd/function/admin.mcfunction
Normal file
@ -0,0 +1,40 @@
|
||||
tellraw @s {"text": "管理员页面:", "color": "red"}
|
||||
|
||||
|
||||
tellraw @s [{"text": "全局:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/reload"}, "hoverEvent": {"action": "show_text", "contents": {"text": "重载", "color": "yellow"}}}, {"text": "重载", "color": "yellow"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:install"}, "hoverEvent": {"action": "show_text", "contents": [{"text": "安装:", "color": "dark_green"}, {"text": "仅安装上次卸载前已安装的模块", "color": "red"}]}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:uninstall"}, "hoverEvent": {"action": "show_text", "contents": [{"text": "卸载:", "color": "dark_red"}, {"text": "将保留模块安装记录", "color": "red"}]}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:reinstall"}, "hoverEvent": {"action": "show_text", "contents": [{"text": "重装:", "color": "gold"}, {"text": "可能可以修复一些奇怪问题,", "color": "white"}, {"text": "将保留模块安装记录", "color": "red"}]}}, {"text": "重装", "color": "gold"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:deep_install"}, "hoverEvent": {"action": "show_text", "contents": [{"text": "深度安装:", "color": "dark_green"}, {"text": "将安装所有模块", "color": "red"}]}}, {"text": "深度安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:deep_uninstall"}, "hoverEvent": {"action": "show_text", "contents": [{"text": "深度卸载:", "color": "dark_red"}, {"text": "将清除模块安装记录", "color": "red"}]}}, {"text": "深度卸载", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:deep_reinstall"}, "hoverEvent": {"action": "show_text", "contents": [{"text": "深度重装:", "color": "gold"}, {"text": "可能可以修复一些奇怪问题,", "color": "white"}, {"text": "将清除模块安装记录", "color": "red"}]}}, {"text": "深度重装", "color": "gold"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "日志等级:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function fzsd:logger/level/fine"}, "hoverEvent": {"action": "show_text", "contents": {"text": "详细", "color": "gray"}}}, {"text": "详细", "color": "gray"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function fzsd:logger/level/debug"}, "hoverEvent": {"action": "show_text", "contents": {"text": "调试", "color": "dark_aqua"}}}, {"text": "调试", "color": "dark_aqua"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function fzsd:logger/level/info"}, "hoverEvent": {"action": "show_text", "contents": {"text": "信息", "color": "green"}}}, {"text": "信息", "color": "green"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "血量显示:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/health/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/health/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
tellraw @s [{"text": "- 名牌下方:", "color": "gray"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function admin.fzsd:module/health/below_name/on"}, "hoverEvent": {"action": "show_text", "contents": {"text": "显示", "color": "dark_green"}}}, {"text": "显示", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function admin.fzsd:module/health/below_name/off"}, "hoverEvent": {"action": "show_text", "contents": {"text": "隐藏", "color": "dark_red"}}}, {"text": "隐藏", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
tellraw @s [{"text": "- 玩家列表内:", "color": "gray"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function admin.fzsd:module/health/list/on"}, "hoverEvent": {"action": "show_text", "contents": {"text": "显示", "color": "dark_green"}}}, {"text": "显示", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function admin.fzsd:module/health/list/off"}, "hoverEvent": {"action": "show_text", "contents": {"text": "隐藏", "color": "dark_red"}}}, {"text": "隐藏", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "玩家位置:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/here/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/here/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "交互器:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/interactor/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/interactor/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "登录消息:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/join_message/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/join_message/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "上一死亡点:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/last_death/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/last_death/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "上次穿出的下界传送门:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/last_nether_portal/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/last_nether_portal/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "上一出生点:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/last_spawn_point/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/last_spawn_point/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "计分板:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/scoreboard/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/scoreboard/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
|
||||
tellraw @s [{"text": "扫地机:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/sweeper/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/sweeper/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
||||
|
||||
tellraw @s [{"text": "幻翼预警:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/phantom_warning/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/phantom_warning/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
|
@ -0,0 +1 @@
|
||||
function fzsd:system/carpet/settings_preset
|
@ -0,0 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b
|
||||
function fzsd:module/health/try_load
|
@ -0,0 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b
|
||||
function fzsd:module/health/try_load
|
@ -0,0 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.list set value 0b
|
||||
function fzsd:module/health/try_load
|
@ -0,0 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.list set value 1b
|
||||
function fzsd:module/health/try_load
|
24
data/fzsd.extra.bbl/advancement/broke_bedrock.json
Normal file
24
data/fzsd.extra.bbl/advancement/broke_bedrock.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"broke_bedrock": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.extra.bbl": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd.extra.bbl:event/advancement/broke_bedrock"
|
||||
}
|
||||
}
|
5
data/fzsd.extra.bbl/function/assign/bbl.mcfunction
Normal file
5
data/fzsd.extra.bbl/function/assign/bbl.mcfunction
Normal file
@ -0,0 +1,5 @@
|
||||
# 见#fzsd.extra.bbl:event/broke_bedrock
|
||||
## 如果运行时id不存在则注册运行时id
|
||||
execute unless score fzsd.module.scoreboard.display.bedrock_broken_count.id fzsd.variable.integer matches 0.. run function fzsd.extra.bbl:display/register_id
|
||||
scoreboard players operation @s fzsd.module.scoreboard.display.bedrock_broken_count += fzsd.var.score fzsd.variable.integer
|
||||
scoreboard players operation fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer
|
5
data/fzsd.extra.bbl/function/assign/general.mcfunction
Normal file
5
data/fzsd.extra.bbl/function/assign/general.mcfunction
Normal file
@ -0,0 +1,5 @@
|
||||
# 见#fzsd.extra.bbl:event/broke_bedrock
|
||||
team join fzsd.module.scoreboard.display.bedrock_broken_count 总破基岩数
|
||||
|
||||
scoreboard players operation 总破基岩数 fzsd.module.scoreboard.display.general = fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general
|
||||
scoreboard players operation 总破基岩数 fzsd.module.scoreboard.display.bedrock_broken_count = fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general
|
3
data/fzsd.extra.bbl/function/clear_data.mcfunction
Normal file
3
data/fzsd.extra.bbl/function/clear_data.mcfunction
Normal file
@ -0,0 +1,3 @@
|
||||
# 见#fzsd:module/scoreboard/clear_data
|
||||
## 清除数据
|
||||
scoreboard objectives remove fzsd.module.scoreboard.display.bedrock_broken_count
|
@ -0,0 +1,21 @@
|
||||
# 见./try_display
|
||||
## 判断颜色代码,见:https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 10 run scoreboard objectives setdisplay sidebar.team.green fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 11 run scoreboard objectives setdisplay sidebar.team.aqua fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 12 run scoreboard objectives setdisplay sidebar.team.red fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 13 run scoreboard objectives setdisplay sidebar.team.light_purple fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 14 run scoreboard objectives setdisplay sidebar.team.yellow fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 15 run scoreboard objectives setdisplay sidebar.team.white fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
|
||||
## 详细
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.module.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}, {"text": "计分板"}]
|
@ -0,0 +1,2 @@
|
||||
# 见#fzsd:module/scoreboard/display/carousel/try_display
|
||||
execute if score fzsd.module.scoreboard.display.current_id fzsd.variable.integer = fzsd.module.scoreboard.display.id.bedrock_broken_count fzsd.variable.integer run function fzsd.extra.bbl:display/carousel/set_display
|
@ -0,0 +1,6 @@
|
||||
# 见#fzsd:module/scoreboard/display/register_id
|
||||
#### 如果破基岩榜分数不为0,注册破基岩计分板id
|
||||
execute if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. run function #fzsd:calculation/highest_id_add_1
|
||||
execute if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. run scoreboard players operation fzsd.module.scoreboard.display.id.bedrock_broken_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer
|
||||
|
||||
execute if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.module.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.bedrock_broken_count", "objective": "fzsd.variable.integer"}}]
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "aqua"}'
|
||||
scoreboard objectives setdisplay sidebar.team.aqua fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "aqua"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color aqua
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "aqua"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "black"}'
|
||||
scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "black"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color black
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "black"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "blue"}'
|
||||
scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "blue"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color blue
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "blue"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_aqua"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_aqua"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_aqua
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "dark_aqua"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_blue"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_blue"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_blue
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "dark_blue"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_gray"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_gray"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_gray
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "dark_gray"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_green"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_green"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_green
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "dark_green"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_purple"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_purple"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_purple
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "dark_purple"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_red"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_red"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_red
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "dark_red"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "gold"}'
|
||||
scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "gold"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color gold
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "gold"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "gray"}'
|
||||
scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "gray"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color gray
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "gray"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "green"}'
|
||||
scoreboard objectives setdisplay sidebar.team.green fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "green"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color green
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "green"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "light_purple"}'
|
||||
scoreboard objectives setdisplay sidebar.team.light_purple fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "light_purple"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color light_purple
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "light_purple"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "red"}'
|
||||
scoreboard objectives setdisplay sidebar.team.red fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "red"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color red
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "red"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "white"}'
|
||||
scoreboard objectives setdisplay sidebar.team.white fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "white"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color white
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "white"}
|
@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "yellow"}'
|
||||
scoreboard objectives setdisplay sidebar.team.yellow fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "yellow"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color yellow
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "yellow"}
|
@ -0,0 +1,7 @@
|
||||
# 见advancements/fzsd.extra.bbl:broke_bedrock
|
||||
## 排除假人并触发事件
|
||||
execute if predicate fzsd:is_real_player run function fzsd.extra.bbl:event/player/broke_bedrock
|
||||
|
||||
## 重置事件
|
||||
scoreboard players set @s fzsd.extra.bbl 0
|
||||
advancement revoke @s only fzsd.extra.bbl:broke_bedrock
|
@ -0,0 +1,6 @@
|
||||
# 见../advancement/broke_bedrock
|
||||
## 详细
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "破基岩"}]
|
||||
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer = @s fzsd.extra.bbl
|
||||
function #fzsd.extra.bbl:event/broke_bedrock
|
11
data/fzsd.extra.bbl/function/install.mcfunction
Normal file
11
data/fzsd.extra.bbl/function/install.mcfunction
Normal file
@ -0,0 +1,11 @@
|
||||
# 应在原模块安装时一并安装模块扩展,见#fzsd:module/scoreboard/install
|
||||
## 同时应在加载时检测是否需要重新安装,见./try_install
|
||||
## 添加底层实现计分板
|
||||
scoreboard objectives add fzsd.extra.bbl dummy
|
||||
## 添加显示计分板
|
||||
scoreboard objectives add fzsd.module.scoreboard.display.bedrock_broken_count dummy
|
||||
## 添加计分板订阅队伍
|
||||
team add fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
## 设为已安装
|
||||
data modify storage fzsd:install fzsd.extra.bbl set value 1b
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装扩展:破基岩榜"}]
|
@ -0,0 +1,3 @@
|
||||
# 见#fzsd:module/scoreboard/interactor/display
|
||||
## 当破基岩榜分数不为0时向玩家显示按钮
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. run tellraw @s [{"text": "[", "color": "dark_gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1210"}, "hoverEvent": {"action": "show_text", "contents": {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}}}, {"nbt": "fzsd.module.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}, {"text": "]"}]
|
@ -0,0 +1,2 @@
|
||||
# 见#fzsd:module/scoreboard/interactor/on_click
|
||||
execute if score @s fzsd.module.interactor.trigger matches -1210 run function fzsd.extra.bbl:interactor/subscribe
|
@ -0,0 +1,6 @@
|
||||
# 见./on_click
|
||||
|
||||
team join fzsd.module.scoreboard.display.bedrock_broken_count @s
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}, {"text": "计分板"}]
|
3
data/fzsd.extra.bbl/function/load.mcfunction
Normal file
3
data/fzsd.extra.bbl/function/load.mcfunction
Normal file
@ -0,0 +1,3 @@
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "fzsd.module.scoreboard.display.bedrock_broken_count - "}, {"nbt": "fzsd.module.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}]
|
||||
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已加载扩展:破基岩榜"}]
|
2
data/fzsd.extra.bbl/function/try_install.mcfunction
Normal file
2
data/fzsd.extra.bbl/function/try_install.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
# 扩展现有的模块时,应在加载时检测是否需要安装,见#fzsd:module/scoreboard/load
|
||||
execute unless data storage fzsd:install fzsd.extra{bbl: 1b} run function fzsd.extra.bbl:install
|
8
data/fzsd.extra.bbl/function/uninstall.mcfunction
Normal file
8
data/fzsd.extra.bbl/function/uninstall.mcfunction
Normal file
@ -0,0 +1,8 @@
|
||||
# 见#fzsd:module/scoreboard/uninstall
|
||||
## 移除底层实现计分板
|
||||
scoreboard objectives remove fzsd.extra.bbl
|
||||
## 移除计分板订阅队伍
|
||||
team remove fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
## 设为已卸载
|
||||
data modify storage fzsd:install fzsd.extra.bbl set value 0b
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载扩展:破基岩榜"}]
|
@ -18,4 +18,4 @@ execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer mat
|
||||
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 15 run scoreboard objectives setdisplay sidebar.team.white fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
|
||||
## 详细
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}, {"text": "计分板"}]
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.module.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}, {"text": "计分板"}]
|
@ -3,4 +3,4 @@
|
||||
execute if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. run function #fzsd:calculation/highest_id_add_1
|
||||
execute if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. run scoreboard players operation fzsd.module.scoreboard.display.id.bedrock_broken_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer
|
||||
|
||||
execute if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.bedrock_broken_count", "objective": "fzsd.variable.integer"}}]
|
||||
execute if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.module.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.bedrock_broken_count", "objective": "fzsd.variable.integer"}}]
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "aqua"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "aqua"}'
|
||||
scoreboard objectives setdisplay sidebar.team.aqua fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "aqua"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color aqua
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "black"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "black"}'
|
||||
scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "black"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color black
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "blue"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "blue"}'
|
||||
scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "blue"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color blue
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_aqua"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_aqua"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_aqua"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_aqua
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_blue"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_blue"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_blue"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_blue
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_gray"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_gray"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_gray"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_gray
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_green"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_green"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_green"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_green
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_purple"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_purple"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_purple"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_purple
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_red"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "dark_red"}'
|
||||
scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "dark_red"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color dark_red
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "gold"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "gold"}'
|
||||
scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "gold"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color gold
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "gray"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "gray"}'
|
||||
scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "gray"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color gray
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "green"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "green"}'
|
||||
scoreboard objectives setdisplay sidebar.team.green fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "green"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color green
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "light_purple"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "light_purple"}'
|
||||
scoreboard objectives setdisplay sidebar.team.light_purple fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "light_purple"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color light_purple
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "red"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "red"}'
|
||||
scoreboard objectives setdisplay sidebar.team.red fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "red"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color red
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "white"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "white"}'
|
||||
scoreboard objectives setdisplay sidebar.team.white fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "white"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color white
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "yellow"}'
|
||||
data modify storage fzsd:module fzsd.module.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "yellow"}'
|
||||
scoreboard objectives setdisplay sidebar.team.yellow fzsd.module.scoreboard.display.bedrock_broken_count
|
||||
scoreboard objectives modify fzsd.module.scoreboard.display.bedrock_broken_count displayname {"text": "破基岩榜", "color": "yellow"}
|
||||
team modify fzsd.module.scoreboard.display.bedrock_broken_count color yellow
|
||||
|
@ -1,3 +1,3 @@
|
||||
# 见#fzsd:module/scoreboard/interactor/display
|
||||
## 当破基岩榜分数不为0时向玩家显示按钮
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. run tellraw @s [{"text": "[", "color": "dark_gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1210"}, "hoverEvent": {"action": "show_text", "contents": {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}}}, {"nbt": "fzsd.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}, {"text": "]"}]
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.module.scoreboard.total.bedrock_broken_count fzsd.module.scoreboard.assign.general matches 1.. run tellraw @s [{"text": "[", "color": "dark_gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1210"}, "hoverEvent": {"action": "show_text", "contents": {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}}}, {"nbt": "fzsd.module.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}, {"text": "]"}]
|
@ -1,3 +1,3 @@
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "fzsd.module.scoreboard.display.bedrock_broken_count - "}, {"nbt": "fzsd.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}]
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "fzsd.module.scoreboard.display.bedrock_broken_count - "}, {"nbt": "fzsd.module.scoreboard.text.bedrock_broken_count", "interpret": true, "storage": "fzsd:module"}]
|
||||
|
||||
execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已加载扩展:破基岩榜"}]
|
6
data/fzsd.extra.bbl/tags/function/display/set_text.json
Normal file
6
data/fzsd.extra.bbl/tags/function/display/set_text.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd.extra.bbl:display/set_text/dark_gray"
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd.extra.bbl:assign/bbl",
|
||||
"fzsd.extra.bbl:assign/general"
|
||||
]
|
||||
}
|
7
data/fzsd/advancement/game_event.json
Normal file
7
data/fzsd/advancement/game_event.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"criteria": {
|
||||
"root":{
|
||||
"trigger": "minecraft:impossible"
|
||||
}
|
||||
}
|
||||
}
|
24
data/fzsd/advancement/game_event/on_aviate_one_meter.json
Normal file
24
data/fzsd/advancement/game_event/on_aviate_one_meter.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_aviate_one_meter": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.event.aviating_distance": {
|
||||
"min": 200
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_aviate_one_meter"
|
||||
}
|
||||
}
|
24
data/fzsd/advancement/game_event/on_dead.json
Normal file
24
data/fzsd/advancement/game_event/on_dead.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_dead": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.event.death_count": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_dead"
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_entered_nether_portal": {
|
||||
"trigger": "minecraft:changed_dimension",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"location": {
|
||||
"block": {
|
||||
"blocks": [
|
||||
"minecraft:nether_portal"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_entered_nether_portal"
|
||||
}
|
||||
}
|
22
data/fzsd/advancement/game_event/on_fished.json
Normal file
22
data/fzsd/advancement/game_event/on_fished.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_fished": {
|
||||
"trigger": "minecraft:fishing_rod_hooked",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
}
|
||||
],
|
||||
"item": {
|
||||
"items": "#fzsd:raw_fishes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_fished"
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_hurt_entity_with_tools": {
|
||||
"trigger": "minecraft:player_hurt_entity",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"equipment": {
|
||||
"mainhand": {
|
||||
"items": "#fzsd:tools"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_hurt_entity_with_tools"
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_killed_mob_or_player": {
|
||||
"trigger": "minecraft:player_killed_entity",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
}
|
||||
],
|
||||
"entity": [
|
||||
{
|
||||
"condition": "minecraft:inverted",
|
||||
"term": {
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"type": "#fzsd:ignore_on_player_killed_entity"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"killing_blow": {
|
||||
"bypasses_invulnerability": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_killed_mob_or_player"
|
||||
}
|
||||
}
|
27
data/fzsd/advancement/game_event/on_login.json
Normal file
27
data/fzsd/advancement/game_event/on_login.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_login": {
|
||||
"trigger": "tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:inverted",
|
||||
"term": {
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.event.leave_game": {
|
||||
"max": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_login"
|
||||
}
|
||||
}
|
25
data/fzsd/advancement/game_event/on_piglin_trade.json
Normal file
25
data/fzsd/advancement/game_event/on_piglin_trade.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_piglin_trade": {
|
||||
"trigger": "minecraft:thrown_item_picked_up_by_entity",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
}
|
||||
],
|
||||
"entity": {
|
||||
"type": "minecraft:piglin",
|
||||
"flags": {
|
||||
"is_baby": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_piglin_trade"
|
||||
}
|
||||
}
|
19
data/fzsd/advancement/game_event/on_placed_block.json
Normal file
19
data/fzsd/advancement/game_event/on_placed_block.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_placed_block": {
|
||||
"trigger": "minecraft:placed_block",
|
||||
"conditions": {
|
||||
"location": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_placed_block"
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
{
|
||||
"parent": "fzsd:game_event/on_placed_block",
|
||||
"criteria": {
|
||||
"on_placed_liquid": {
|
||||
"trigger": "minecraft:placed_block",
|
||||
"conditions": {
|
||||
"location": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:location_check",
|
||||
"predicate": {
|
||||
"block": {
|
||||
"blocks": "#fzsd:liquid"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_placed_block/on_placed_liquid"
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
{
|
||||
"parent": "fzsd:game_event/on_placed_block",
|
||||
"criteria": {
|
||||
"on_placed_solid": {
|
||||
"trigger": "minecraft:placed_block",
|
||||
"conditions": {
|
||||
"location": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:inverted",
|
||||
"term":
|
||||
{
|
||||
"condition": "minecraft:location_check",
|
||||
"predicate": {
|
||||
"block": {
|
||||
"blocks": "#fzsd:liquid"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_placed_block/on_placed_solid"
|
||||
}
|
||||
}
|
24
data/fzsd/advancement/game_event/on_play_one_hour.json
Normal file
24
data/fzsd/advancement/game_event/on_play_one_hour.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_play_one_hour": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.event.play_ticks": {
|
||||
"min": 72000
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_play_one_hour"
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_shears_used_on_entity": {
|
||||
"trigger": "minecraft:player_interacted_with_entity",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
}
|
||||
],
|
||||
"entity": {
|
||||
"type": "#fzsd:shearable"
|
||||
},
|
||||
"item": {
|
||||
"items": "#fzsd:tool/shears"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_shears_used_on_entity"
|
||||
}
|
||||
}
|
19
data/fzsd/advancement/game_event/on_sleeping.json
Normal file
19
data/fzsd/advancement/game_event/on_sleeping.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_sleeping": {
|
||||
"trigger": "minecraft:slept_in_bed",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_sleeping"
|
||||
}
|
||||
}
|
28
data/fzsd/advancement/game_event/on_sneak.json
Normal file
28
data/fzsd/advancement/game_event/on_sneak.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_sneak": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"flags": {
|
||||
"is_sneaking": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_sneak"
|
||||
}
|
||||
}
|
24
data/fzsd/advancement/game_event/on_took_damage.json
Normal file
24
data/fzsd/advancement/game_event/on_took_damage.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_took_damage": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.event.damage_taken": {
|
||||
"min": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_took_damage"
|
||||
}
|
||||
}
|
50
data/fzsd/advancement/game_event/on_tools_used_on_block.json
Normal file
50
data/fzsd/advancement/game_event/on_tools_used_on_block.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_tools_exclude_axes_used_on_block": {
|
||||
"trigger": "minecraft:item_used_on_block",
|
||||
"conditions": {
|
||||
"location": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"items": "#fzsd:tools_exclude_axes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:all_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"items": "#fzsd:tool/axes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:location_check",
|
||||
"predicate": {
|
||||
"__comment": "斧子剥树皮会触发两次,所以用目标方块限定只触发一次",
|
||||
"block": {
|
||||
"blocks": "#fzsd:stripped_blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_tools_used_on_block"
|
||||
}
|
||||
}
|
34
data/fzsd/advancement/game_event/on_unsneak.json
Normal file
34
data/fzsd/advancement/game_event/on_unsneak.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"parent": "fzsd:game_event/on_sneak",
|
||||
"criteria": {
|
||||
"on_unsneak": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"flags": {
|
||||
"is_sneaking": false
|
||||
},
|
||||
"type_specific": {
|
||||
"type": "player",
|
||||
"advancements": {
|
||||
"fzsd:game_event/on_sneak": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_unsneak"
|
||||
}
|
||||
}
|
19
data/fzsd/advancement/game_event/on_used_tool.json
Normal file
19
data/fzsd/advancement/game_event/on_used_tool.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_used_tool": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:used_tool"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_used_tool"
|
||||
}
|
||||
}
|
19
data/fzsd/advancement/game_event/on_villager_trade.json
Normal file
19
data/fzsd/advancement/game_event/on_villager_trade.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_villager_trade": {
|
||||
"trigger": "minecraft:villager_trade",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_villager_trade"
|
||||
}
|
||||
}
|
7
data/fzsd/advancement/module/interactor.json
Normal file
7
data/fzsd/advancement/module/interactor.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"criteria": {
|
||||
"interactor": {
|
||||
"trigger": "minecraft:impossible"
|
||||
}
|
||||
}
|
||||
}
|
42
data/fzsd/advancement/module/interactor/on_click.json
Normal file
42
data/fzsd/advancement/module/interactor/on_click.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"parent": "fzsd:module/interactor",
|
||||
"criteria": {
|
||||
"on_click": {
|
||||
"trigger": "minecraft:tick",
|
||||
"conditions": {
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.module.interactor.trigger": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
"entity": "this",
|
||||
"scores": {
|
||||
"fzsd.module.interactor.trigger": {
|
||||
"max": -1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:module/interactor/event/advamcement/on_click"
|
||||
}
|
||||
}
|
2
data/fzsd/function/api/get_current_daytime.mcfunction
Normal file
2
data/fzsd/function/api/get_current_daytime.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
# 游戏时间范围:0-2147483647
|
||||
execute store result score fzsd.var.cache fzsd.variable.integer run time query daytime
|
2
data/fzsd/function/api/get_current_gametime.mcfunction
Normal file
2
data/fzsd/function/api/get_current_gametime.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
# 游戏时间范围:0-2147483647
|
||||
execute store result score fzsd.var.cache fzsd.variable.integer run time query gametime
|
@ -0,0 +1 @@
|
||||
data modify storage fzsd:global fzsd.api.dimension.name set value '{"nbt": "fzsd.api.dimension.id", "storage": "fzsd:global"}'
|
@ -0,0 +1 @@
|
||||
execute if data storage fzsd:global fzsd.api.dimension{id:'minecraft:overworld'} run data modify storage fzsd:global fzsd.api.dimension.name set value '{"text": "主世界", "color": "dark_green"}'
|
@ -0,0 +1 @@
|
||||
execute if data storage fzsd:global fzsd.api.dimension{id:'minecraft:the_end'} run data modify storage fzsd:global fzsd.api.dimension.name set value '{"text": "末地", "color": "dark_gray"}'
|
@ -0,0 +1 @@
|
||||
execute if data storage fzsd:global fzsd.api.dimension{id:'minecraft:the_nether'} run data modify storage fzsd:global fzsd.api.dimension.name set value '{"text": "下界", "color": "dark_red"}'
|
2
data/fzsd/function/api/get_player_dimension.mcfunction
Normal file
2
data/fzsd/function/api/get_player_dimension.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
data modify storage fzsd:global fzsd.api.dimension.id set from entity @s Dimension
|
||||
data remove storage fzsd:global fzsd.api.dimension.name
|
1
data/fzsd/function/api/get_time_since_rest.mcfunction
Normal file
1
data/fzsd/function/api/get_time_since_rest.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard players operation fzsd.var.cache fzsd.variable.integer = @s fzsd.api.time_since_rest
|
5
data/fzsd/function/api/install.mcfunction
Normal file
5
data/fzsd/function/api/install.mcfunction
Normal file
@ -0,0 +1,5 @@
|
||||
## 距上次睡觉时间
|
||||
scoreboard objectives add fzsd.api.time_since_rest minecraft.custom:time_since_rest
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装系统组件:API"}]
|
5
data/fzsd/function/api/uninstall.mcfunction
Normal file
5
data/fzsd/function/api/uninstall.mcfunction
Normal file
@ -0,0 +1,5 @@
|
||||
## 距上次睡觉时间
|
||||
scoreboard objectives remove fzsd.api.time_since_rest
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载系统组件:API"}]
|
5
data/fzsd/function/boot.mcfunction
Normal file
5
data/fzsd/function/boot.mcfunction
Normal file
@ -0,0 +1,5 @@
|
||||
execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.9-beta.2'}}
|
||||
execute if data storage fzsd:version fzsd{need_update: 1b} run function fzsd:system/update
|
||||
function fzsd:system/carpet/try_load_fzsd_score
|
||||
function #fzsd:load
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "FZ Survival Data Pack,当前版本:", "color": "gold"}, {"nbt":"fzsd.version", "storage": "fzsd:version", "color": "red"}]
|
1
data/fzsd/function/entry.mcfunction
Normal file
1
data/fzsd/function/entry.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
execute unless data storage fzsd:install fzsd{global: 0b} run function fzsd:boot
|
@ -0,0 +1,7 @@
|
||||
# 调用者:advancements/fzsd:~
|
||||
|
||||
execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_aviate_one_meter
|
||||
|
||||
## 重置事件
|
||||
scoreboard players operation @s fzsd.event.aviating_distance %= 200 fzsd.variable.integer
|
||||
advancement revoke @s from fzsd:game_event/on_aviate_one_meter
|
@ -0,0 +1,7 @@
|
||||
# 调用者:advancements/fzsd:~
|
||||
|
||||
execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_dead
|
||||
|
||||
## 重置事件
|
||||
scoreboard players set @s fzsd.event.death_count 0
|
||||
advancement revoke @s from fzsd:game_event/on_dead
|
@ -0,0 +1,7 @@
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "进入了下届传送门"}]
|
||||
|
||||
function #fzsd:game_event/player/on_entered_nether_portal
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s from fzsd:game_event/on_entered_nether_portal
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user