Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 05853884de | |||
| 5ea4c7461f | |||
| 648898966e | |||
| 153439abfc | |||
| b4b296ea9b | |||
| b1ea5bb682 | |||
| 2e9b0637c4 | |||
| 6b000ceba9 | |||
| 9fb6a4f0bc | |||
| 03d0d0df63 | |||
| 95abf97f17 | |||
| f886ca2ed5 | |||
| ffe6930599 | |||
| 1bfe996fb5 | |||
| 4c66b76e1f | |||
| ab37f056d7 | |||
| caad1117c3 | |||
| 6ac7cbc246 | |||
| 6a26940eef | |||
| dec77bb496 | |||
| 8325f9ec08 | |||
| 2fd72d84de | |||
| 47bd69d3a8 | |||
| 8162a7031a | |||
| 08f73b9b9c | |||
| 2a31e4a2c6 | |||
| e431f13e49 | |||
| 718ed537c4 | |||
| 025d821495 | |||
| 4625636ed4 | |||
| 670ab5514c | |||
| c39ff19f1d | |||
| 28d8625cb6 | |||
| 0905d460b6 | |||
| a40a33b19c | |||
| 423447dfe0 | |||
| c11e3ea966 | |||
| 95c003825a | |||
| 40088893b5 | |||
| c305885777 | |||
| 284a7594ec | |||
| faad8f7f24 | |||
| cccc793446 | |||
| 41657ce24c | |||
| a9f8c2068a | |||
| 696238c188 | |||
| 7bdae8271e | |||
| 69ddfba745 | |||
| d7a4b8850f | |||
| bd651ce38c | |||
| e2ca203450 | |||
| 90155651ab | |||
| 2e9bbaf22c | |||
| 3b902c7880 | |||
| 5e2858a25a | |||
| 59230b5389 | |||
| c189ac700a | |||
| 525e1a0865 | |||
| 24bb299869 | |||
| 26dac885cb | |||
| 7fc0c2612a | |||
| ed3c0e5077 | |||
| 3d2348dd61 | |||
| d05ac38056 | |||
| a8c56ab5c6 | |||
| 1b18ff0218 | |||
| 76e80ac0ce | |||
| 1defc59eb5 |
Vendored
+9
-7
@@ -8,13 +8,15 @@
|
||||
"tagRemove": "tag ${1:target} remove ${2:tag}",
|
||||
"dataModifyStorageFromSelf": "data modify storage ${1:id} ${2:path} set from entity @s ${3:path}",
|
||||
"summonAec": "summon minecraft:area_effect_cloud ~ ~ ~ {Age: -2147483648, Duration: -1, WaitTime: -2147483648, Tags: [\"${1:tag}\"]}",
|
||||
"logFine": "execute if score fz.logger.level fz.variable.integer matches ..300 run tellraw @a [{\"nbt\": \"fz.level.fine\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${log_fine}\"}",
|
||||
"logDebug": "execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{\"nbt\": \"fz.level.debug\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_debug}\"}]",
|
||||
"logInfo": "execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{\"nbt\": \"fz.level.info\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_info}\"}]",
|
||||
"logAlert": "execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @a [{\"nbt\": \"fz.level.alert\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_alert}\"}]",
|
||||
"logError": "execute if score fz.logger.level fz.variable.integer matches ..800 run tellraw @a [{\"nbt\": \"fz.level.error\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_error}\"}]",
|
||||
"logFine": "execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{\"nbt\": \"fzsd.level.fine\", \"interpret\": true, \"storage\": \"fzsd:logger\"}, {\"text\": \"${log_fine}\"}",
|
||||
"logDebug": "execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{\"nbt\": \"fzsd.level.debug\", \"interpret\": true, \"storage\": \"fzsd:logger\"}, {\"text\": \"${1:log_debug}\"}]",
|
||||
"logInfo": "execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{\"nbt\": \"fzsd.level.info\", \"interpret\": true, \"storage\": \"fzsd:logger\"}, {\"text\": \"${1:log_info}\"}]",
|
||||
"logAlert": "execute if score fzsd.logger.level fzsd.variable.integer matches ..600 run tellraw @a [{\"nbt\": \"fzsd.level.alert\", \"interpret\": true, \"storage\": \"fzsd:logger\"}, {\"text\": \"${1:log_alert}\"}]",
|
||||
"logError": "execute if score fzsd.logger.level fzsd.variable.integer matches ..800 run tellraw @a [{\"nbt\": \"fzsd.level.error\", \"interpret\": true, \"storage\": \"fzsd:logger\"}, {\"text\": \"${1:log_error}\"}]",
|
||||
"TEXT": "{\"text\": \"${1:TEXT}\", \"color\": \"${2:COLOR}\"}",
|
||||
"storageText": "{\"nbt\": \"${1:NBT}\", \"interpret\": true, \"storage\": \"${2:A namespaced ID}\"}",
|
||||
"ifInstalled": "execute if data storage fz:installed fz.module{${1:module_name}:1b} run ${tellraw}"
|
||||
}
|
||||
"ifInstalled": "execute if data storage fzsd:installed fzsd.module{${1:module_name}:1b} run ${tellraw}"
|
||||
},
|
||||
"datapack.env.cmdVersion": "1.20",
|
||||
"datapack.env.dataVersion": "1.20"
|
||||
}
|
||||
@@ -18,19 +18,14 @@
|
||||
"values": ...
|
||||
}
|
||||
```
|
||||
- ***函数和标签是否能被扩展数据包成功覆盖,取决于数据包加载顺序***,请使用`/datapack enable <xxx> after <xxx>`指令,使您的扩展数据包在FZ's Survival Datapack之后加载
|
||||
|
||||
|
||||
## 基本要求
|
||||
- 接口逻辑和模块逻辑分离
|
||||
- 函数由两个以上的函数调用,或由不同包下的函数调用,或需要作为接口开放给下游数据包时,应改用标签调用!
|
||||
- 函数调用尽量不要使用`function`命令,应改在标签中按顺序调用!
|
||||
|
||||
|
||||
## 未来计划
|
||||
- 细化版本管理,提供不同版本之间的升级函数,由`update_manager`控制。*务必仔细测试再发布,一旦升级无法降级!*
|
||||
- playerdata相关功能
|
||||
|
||||
|
||||
## 系统模块
|
||||
|
||||
### 频繁使用的计算单元
|
||||
@@ -61,7 +56,7 @@
|
||||
- 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..600 run tellraw @a [{"nbt": "fzsd.level.alert", "interpret": true, "storage": "fzsd:logger"}, {"text": "你的日志"}`
|
||||
|
||||
#### 意外 Exception
|
||||
###### 暂不提供
|
||||
- 暂不提供
|
||||
|
||||
#### 错误 Error
|
||||
- 等级:800
|
||||
@@ -73,18 +68,16 @@
|
||||
### 交互器模块
|
||||
|
||||
#### 按钮操作
|
||||
1. 定义一个显示按钮时执行的函数,使用形如`tellraw @s {"text": "[按钮]", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.config.trigger set <触发器分数>"}}`的指令定义按钮。
|
||||
- 触发器分数为正数会重新向玩家发送交互按钮,如不想重新发送,请使用负数
|
||||
1. 定义一个显示按钮时执行的函数,使用形如`tellraw @s {"text": "[按钮]", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set <触发器分数>"}}`的指令定义按钮。
|
||||
- *触发器分数为正数会重新向玩家发送交互按钮,如不想重新发送,请使用负数*
|
||||
- 大多数情况下这里的触发器分数必须是独一无二的
|
||||
- 建议使用`>10000`的随机数作为自定义按钮的触发器分数
|
||||
2. 在[`#fzsd:module/config/display`](data/fzsd/tags/functions/module/config/display.json)标签中注册上述函数
|
||||
3. 定义一个点击按钮时执行的函数,使用形如`execute if score @s fzsd.module.config.trigger matches <min>..<max> run ...`的指令判断玩家的触发器分数,并执行你的操作
|
||||
4. 如需在点击后重新显示一遍配置页面,请在上述函数中调用一次[`#fzsd:module/config/display`](data/fzsd/tags/functions/module/config/display.json)标签,**请不要将此标签直接注册到[`#fzsd:module/config/on_click`](data/fzsd/tags/functions/module/config/on_click.json)标签中**
|
||||
5. 在[`#fzsd:module/config/on_click`](data/fzsd/tags/functions/module/config/on_click.json)标签中注册上述函数
|
||||
2. 在[`#fzsd:module/interactor/event/on_display`](data/fzsd/tags/functions/module/interactor/display.json)标签中注册上述函数
|
||||
3. 定义一个点击按钮时执行的函数,使用形如`execute if score @s fzsd.module.interactor.trigger matches <min>..<max> run ...`的指令判断玩家的触发器分数,并执行你的操作
|
||||
4. 在[`#fzsd:module/interactor/event/on_click`](data/fzsd/tags/functions/module/interactor/event/on_click.json)标签中注册上述函数
|
||||
|
||||
#### 其他接口
|
||||
- 标签[`#fzsd:module/config/timeout`](data/fzsd/tags/functions/module/config/timeout.json):超时时的操作
|
||||
- 标签[`#fzsd:module/config/reset_trigger`](data/fzsd/tags/functions/module/config/reset_trigger.json):重置玩家`@s`的触发器计分板
|
||||
#### 其他标签
|
||||
- 标签[`#fzsd:module/interactor/reset_trigger`](data/fzsd/tags/functions/module/interactor/reset_trigger.json):重置玩家`@s`的触发器计分板
|
||||
|
||||
### 计分板模块
|
||||
|
||||
@@ -109,6 +102,10 @@
|
||||
|
||||
## 自定义模块
|
||||
|
||||
### 排除假人
|
||||
- 如果您不想对假人执行您的命令,请将以下语句添加在您要执行的命令之前:
|
||||
<pre><code><font color=ee82ee>execute </font><font color=1e90ff>if predicate </font><font color=f0e68c>fzsd:is_real_player</font></code></pre>
|
||||
|
||||
#### 注册安装、卸载、加载函数
|
||||
- 在下列标签中注册你的安装、卸载、加载函数:
|
||||
- [`#fzsd:system/install/module`](data/fzsd/tags/functions/system/install/module.json)
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
|
||||
FZSD许可证
|
||||
FZSD许可协议
|
||||
|
||||
2022/7/20 https://gitee.com/harvey-husky/fz-survival-datapack/LICENSE
|
||||
2023/6/6 https://gitee.com/harvey-husky/fz-survival-datapack/blob/dev/3.0/LICENSE
|
||||
|
||||
版权所有 © 2019-2022 延皓<https://gitee.com/harvey-husky><https://space.bilibili.com/677233356>
|
||||
版权所有 © 2019-2023 延皓<https://gitee.com/harvey-husky><https://space.bilibili.com/677233356>
|
||||
|
||||
定义:
|
||||
“该许可证”指FZSD许可证。
|
||||
“该软件”指许可在该许可证下的程序和相关文档的集合。
|
||||
“该许可协议”指FZSD许可协议。
|
||||
“该软件”指许可在该许可协议下的程序和相关文档的集合。
|
||||
“官方网址”指由版权所有者提供的该软件的发布网址。
|
||||
|
||||
您对该软件的复制、使用、修改及分发受如下条款的约束:
|
||||
1. 禁止添加、修改或删除该许可证的内容。
|
||||
1. 禁止添加、修改或删除该许可协议的内容。
|
||||
2. 禁止未经授权的转载、销售或二次发布该软件。
|
||||
3. 禁止添加、修改或抹除该软件中的原作者署名。
|
||||
4. 如果您从部署了该软件的Minecraft服务器中以任何方式获取了收益,则您必须在游戏中的明显位置明确告知用户您的Minecraft服务器使用了该软件,并附上官方网址。
|
||||
4. 如果您从部署了该软件的Minecraft服务器中以任何方式获取了收益,则您必须在游戏中的明显位置明确告知用户您的Minecraft服务器使用了该软件,并附上该软件的官方网址。
|
||||
5. 如果您修改了该软件中的任何内容,您必须将修改部分开源在主流开源平台(如gitee<https://gitee.com/>或github<https://github.com/>等)。
|
||||
6. 如果您修改了该软件中的任何内容,您必须保留该许可证,但您可以追加其他许可证(不包括不支持附加条款的许可证)。当您添加的许可证中的条款与该许可证冲突时,必须以该许可证为准。
|
||||
6. 如果您修改了该软件中的任何内容,您必须保留该许可协议,但您可以追加其他许可协议(不包括不支持附加条款的许可协议)。当您添加的许可协议中的条款与该许可协议冲突时,必须以该许可协议为准。
|
||||
7. 该软件在提供时不带任何明示或默示的担保。在任何情况下,版权所有者不对任何人因使用该软件而引发的任何直接或间接损失承担任何责任。
|
||||
@@ -4,15 +4,16 @@
|
||||
|
||||
#### @Author: Harvey_Husky
|
||||
|
||||
#### Copyright (C) 2019-2022 Harvey_Husky
|
||||
#### Copyright (C) 2019-2023 Harvey_Husky
|
||||
|
||||
[Bilibili专栏](https://www.bilibili.com/read/cv4267319)(年久失修)
|
||||
|
||||
## 安装教程
|
||||
|
||||
1. 兼容性
|
||||
- `数据包 v3.0.x` 暂时只支持 `Minecraft 1.19+`
|
||||
- `数据包 v2.2.x` 支持 `Minecraft 1.19+`
|
||||
- `数据包 v3.1.x` 支持 `Minecraft 1.20.x`
|
||||
- `数据包 v3.0.x` 支持 `Minecraft 1.18.2-1.19.x`
|
||||
- `数据包 v2.2.x` 支持 `Minecraft 1.19.x`
|
||||
- `数据包 v2.1.x` 支持 `Minecraft 1.17.x-1.18.x`
|
||||
- `数据包 v2.0.x` 支持 `Minecraft 1.16.3-1.16.5`
|
||||
2. 前往[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)下载对应MC版本的数据包
|
||||
@@ -20,12 +21,12 @@
|
||||
4. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
||||
5. (可选)下载并安装 [Carpet Mod **1.4.24**](https://github.com/gnembon/fabric-carpet/releases) 或以上版本
|
||||
6. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||
7. 执行 `reload` 指令(或重新打开存档)
|
||||
7. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`)
|
||||
|
||||
|
||||
# FZ生存数据包 3.0
|
||||
# FZ生存数据包 3.1
|
||||
|
||||
[](https://gitee.com/harvey-husky/FZ-sDatapack/releases/v3.0.0) [](https://minecraft.net/)
|
||||
[](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [](https://minecraft.net/)
|
||||
|
||||
> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
|
||||
|
||||
@@ -52,19 +53,45 @@
|
||||
| 放置榜 | fzsd.module.scoreboard.display.placement_count |
|
||||
| 交易榜 | fzsd.module.scoreboard.display.trade_count |
|
||||
|
||||
- 兼容[破基岩榜Mod](https://gitee.com/harvey-husky/yh-bbl)
|
||||
- 安装该Mod后,使用连点器破基岩,破基岩榜将自动显示在交互器页面
|
||||
|
||||
| 默认名称 | 计分板ID |
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 破基岩榜 |fzsd.module.scoreboard.display.bedrock_broken_count|
|
||||
|
||||
|
||||
### 地毯脚本
|
||||
|
||||
- 如果你不知道 Carpet Mod 或 Carpet 脚本,请忽略本节
|
||||
- 需要安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases)
|
||||
- 从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||
- 脚本:
|
||||
- `fzsd_score.sc`(**开发中!此处列举目前已完成的**):
|
||||
- `fzsd_score.sc`:
|
||||
- 可避免Carpet假人污染计分板
|
||||
- 执行 `reload` 指令后自动生效
|
||||
- 可以标记哪些玩家是假人
|
||||
- *注:请不要使用为假人名添加“bot”前缀的carpet扩展,本插件不支持此类假人!*
|
||||
- 子命令( `/fzsd_score <子命令>` ):
|
||||
- `merge_old`:用于从 `数据包2.x` 升级后恢复计分板数据
|
||||
- `recalculate_total`:重新计算总分
|
||||
- `updateFrom <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!)
|
||||
- `recalculate`:重新计算所有计分板总分
|
||||
- `recalculate <scoreboardID>`:重新计算该计分板总分
|
||||
- `set <player> <scoreboardID> <score>`:设置该玩家该计分板的分数
|
||||
- `reset <player>`:重置该玩家的所有分数
|
||||
- `reset <player> <scoreboardID>`:重置该玩家该计分板的分数
|
||||
- `restore player <玩家名> <计分板ID>`:恢复该玩家的该计分板分数
|
||||
- `restore player <玩家名>`:恢复该玩家的所有计分板分数
|
||||
- `restore whitelist <计分板ID>`:恢复所有白名单玩家的该计分板分数
|
||||
- `restore whitelist`:恢复所有白名单玩家的所有计分板分数
|
||||
- *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全*
|
||||
- `commandPlayer <permissionType>`:设置player命令权限类型
|
||||
|
||||
### 管理员
|
||||
|
||||
- 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块
|
||||
|
||||
### 其他
|
||||
|
||||
- 见游戏内交互器按钮
|
||||
|
||||
## 开发者相关
|
||||
- 参见[开发文档](/DEVDOC.md)
|
||||
@@ -0,0 +1,38 @@
|
||||
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": "]"}]]]
|
||||
@@ -1 +0,0 @@
|
||||
function #fzsd:deep_install
|
||||
@@ -1 +0,0 @@
|
||||
function #fzsd:deep_reinstall
|
||||
@@ -1 +0,0 @@
|
||||
function #fzsd:deep_uninstall
|
||||
@@ -1 +0,0 @@
|
||||
function #fzsd:install
|
||||
@@ -1 +0,0 @@
|
||||
function #fzsd:load
|
||||
@@ -1 +0,0 @@
|
||||
function fzsd:logger/level/debug
|
||||
@@ -1 +0,0 @@
|
||||
function fzsd:logger/level/fine
|
||||
@@ -1 +0,0 @@
|
||||
function fzsd:logger/level/info
|
||||
+1
@@ -1 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b
|
||||
function #fzsd:module/health/try_load
|
||||
+1
@@ -1 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b
|
||||
function #fzsd:module/health/try_load
|
||||
+1
@@ -1 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.list set value 0b
|
||||
function #fzsd:module/health/try_load
|
||||
+1
@@ -1 +1,2 @@
|
||||
data modify storage fzsd:config fzsd.module.health.display.list set value 1b
|
||||
function #fzsd:module/health/try_load
|
||||
@@ -1 +0,0 @@
|
||||
function #fzsd:reinstall
|
||||
@@ -1 +0,0 @@
|
||||
function #fzsd:uninstall
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "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": "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": "purple"}
|
||||
@@ -0,0 +1,7 @@
|
||||
# 见#fzsd.extra.bbl:display/set_text
|
||||
|
||||
data modify storage fzsd:module fzsd.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.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.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
|
||||
@@ -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.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": "计分板"}]
|
||||
@@ -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.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": "已加载扩展:破基岩榜"}]
|
||||
@@ -0,0 +1,2 @@
|
||||
# 扩展现有的模块时,应在加载时检测是否需要安装,见#fzsd:module/scoreboard/load
|
||||
execute unless data storage fzsd:install fzsd.extra{bbl: 1b} run function fzsd.extra.bbl:install
|
||||
@@ -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": "已卸载扩展:破基岩榜"}]
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd.extra.bbl:display/set_text/black"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd.extra.bbl:assign/bbl",
|
||||
"fzsd.extra.bbl:assign/general"
|
||||
]
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"on_placed_block": {
|
||||
"trigger": "minecraft:placed_block",
|
||||
"conditions": {
|
||||
"player": [
|
||||
"location": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
|
||||
@@ -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": {
|
||||
"tag": "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": {
|
||||
"tag": "fzsd:liquid"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_placed_block/on_placed_solid"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"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:match_tool",
|
||||
"predicate": {
|
||||
"tag": "fzsd:tool/axes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:location_check",
|
||||
"predicate": {
|
||||
"__comment": "斧子剥树皮会触发两次,所以用目标方块限定只触发一次",
|
||||
"block": {
|
||||
"tag": "fzsd:stripped_blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:game_event/advancement/on_tools_used_on_block"
|
||||
}
|
||||
}
|
||||
+8
-5
@@ -1,19 +1,22 @@
|
||||
{
|
||||
"parent": "fzsd:game_event",
|
||||
"criteria": {
|
||||
"on_tools_used_on_block": {
|
||||
"on_tools_exclude_axes_used_on_block": {
|
||||
"__comment": "斧子剥树皮会触发两次!",
|
||||
"trigger": "minecraft:item_used_on_block",
|
||||
"conditions": {
|
||||
"player": [
|
||||
"location": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"tag": "fzsd:tools_exclude_axes"
|
||||
}
|
||||
],
|
||||
"item": {
|
||||
"tag": "fzsd:tools"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7,7 +7,6 @@
|
||||
"player": [
|
||||
{
|
||||
"condition": "minecraft:reference",
|
||||
"entity": "this",
|
||||
"name": "fzsd:used_tool"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"name": "fzsd:is_real_player"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:alternative",
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:entity_scores",
|
||||
@@ -37,6 +37,6 @@
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"function": "fzsd:module/interactor/event/on_click"
|
||||
"function": "fzsd:module/interactor/event/advamcement/on_click"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
data modify storage fzsd:global fzsd.api.dimension.name set value '{"nbt": "fzsd.cache.dimension.id", "storage": "fzsd:global"}'
|
||||
data modify storage fzsd:global fzsd.api.dimension.name set value '{"nbt": "fzsd.api.dimension.id", "storage": "fzsd:global"}'
|
||||
@@ -1,5 +1,5 @@
|
||||
execute store success storage fzsd:version fzsd.need_update int 1 run data merge storage fzsd:version {fzsd:{version: '3.0.0-beta.5'}}
|
||||
execute store success storage fzsd:version fzsd.need_update int 1 run data merge storage fzsd:version {fzsd: {version: '3.1.0.rc.1'}}
|
||||
execute if data storage fzsd:version fzsd{need_update: 1} 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": "yellow"}]
|
||||
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 +1 @@
|
||||
execute unless data storage fzsd:installed fzsd{global: 0b} run function fzsd:boot
|
||||
execute unless data storage fzsd:install fzsd{global: 0b} run function fzsd:boot
|
||||
@@ -4,4 +4,4 @@ execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_
|
||||
|
||||
## 重置事件
|
||||
scoreboard players operation @s fzsd.event.aviating_distance %= 200 fzsd.variable.integer
|
||||
advancement revoke @s only fzsd:game_event/on_aviate_one_meter
|
||||
advancement revoke @s from fzsd:game_event/on_aviate_one_meter
|
||||
@@ -4,4 +4,4 @@ execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_
|
||||
|
||||
## 重置事件
|
||||
scoreboard players set @s fzsd.event.death_count 0
|
||||
advancement revoke @s only fzsd:game_event/on_dead
|
||||
advancement revoke @s from fzsd:game_event/on_dead
|
||||
@@ -4,4 +4,4 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr
|
||||
function #fzsd:game_event/player/on_entered_nether_portal
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_entered_nether_portal
|
||||
advancement revoke @s from fzsd:game_event/on_entered_nether_portal
|
||||
@@ -7,4 +7,4 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr
|
||||
function #fzsd:game_event/player/on_fished
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_fished
|
||||
advancement revoke @s from fzsd:game_event/on_fished
|
||||
@@ -10,4 +10,4 @@ scoreboard players remove @s fzsd.event.used_tool.dig_offset 1
|
||||
function #fzsd:game_event/player/on_hurt_entity_with_tools
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_hurt_entity_with_tools
|
||||
advancement revoke @s from fzsd:game_event/on_hurt_entity_with_tools
|
||||
|
||||
@@ -7,4 +7,4 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr
|
||||
function #fzsd:game_event/player/on_killed_mob_or_player
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_killed_mob_or_player
|
||||
advancement revoke @s from fzsd:game_event/on_killed_mob_or_player
|
||||
@@ -7,4 +7,4 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr
|
||||
function #fzsd:game_event/player/on_piglin_trade
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_piglin_trade
|
||||
advancement revoke @s from fzsd:game_event/on_piglin_trade
|
||||
@@ -1,10 +1,6 @@
|
||||
# 调用者:advancements/fzsd:~
|
||||
|
||||
## 调试
|
||||
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_placed_block
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_placed_block
|
||||
advancement revoke @s from fzsd:game_event/on_placed_block
|
||||
@@ -0,0 +1,6 @@
|
||||
# 调用者:advancements/fzsd:~
|
||||
|
||||
function #fzsd:game_event/player/on_placed_liquid
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s from fzsd:game_event/on_placed_block/on_placed_liquid
|
||||
@@ -0,0 +1,6 @@
|
||||
# 调用者:advancements/fzsd:~
|
||||
|
||||
function #fzsd:game_event/player/on_placed_solid
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s from fzsd:game_event/on_placed_block/on_placed_solid
|
||||
@@ -4,4 +4,4 @@ execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_
|
||||
|
||||
## 重置事件
|
||||
scoreboard players operation @s fzsd.event.play_ticks %= 72000 fzsd.variable.integer
|
||||
advancement revoke @s only fzsd:game_event/on_play_one_hour
|
||||
advancement revoke @s from fzsd:game_event/on_play_one_hour
|
||||
@@ -10,4 +10,4 @@ scoreboard players remove @s fzsd.event.used_tool.dig_offset 1
|
||||
function #fzsd:game_event/player/on_shears_used_on_entity
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_shears_used_on_entity
|
||||
advancement revoke @s from fzsd:game_event/on_shears_used_on_entity
|
||||
@@ -4,4 +4,4 @@ execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_
|
||||
|
||||
## 重置事件
|
||||
scoreboard players operation @s fzsd.event.damage_taken %= 10 fzsd.variable.integer
|
||||
advancement revoke @s only fzsd:game_event/on_took_damage
|
||||
advancement revoke @s from fzsd:game_event/on_took_damage
|
||||
@@ -1,5 +1,4 @@
|
||||
# 调用者:advancements/fzsd:~
|
||||
## 斧子剥树皮会触发两次!!
|
||||
|
||||
## 调试
|
||||
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": "在方块上使用了工具"}]
|
||||
@@ -11,4 +10,5 @@ scoreboard players remove @s fzsd.event.used_tool.dig_offset 1
|
||||
function #fzsd:game_event/player/on_tools_used_on_block
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_tools_used_on_block
|
||||
advancement revoke @s from fzsd:game_event/on_tool_axes_used_on_block
|
||||
advancement revoke @s from fzsd:game_event/on_tools_exclude_axes_used_on_block
|
||||
@@ -10,4 +10,4 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr
|
||||
function #fzsd:game_event/player/on_unsneak
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s until fzsd:game_event/on_unsneak
|
||||
advancement revoke @s through fzsd:game_event/on_unsneak
|
||||
@@ -6,4 +6,4 @@ execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_
|
||||
function #fzsd:game_event/player/on_used_tool/reset_used_tool
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_used_tool
|
||||
advancement revoke @s from fzsd:game_event/on_used_tool
|
||||
@@ -7,4 +7,4 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr
|
||||
function #fzsd:game_event/player/on_villager_trade
|
||||
|
||||
## 重置事件进度
|
||||
advancement revoke @s only fzsd:game_event/on_villager_trade
|
||||
advancement revoke @s from fzsd:game_event/on_villager_trade
|
||||
@@ -0,0 +1,2 @@
|
||||
## 调试
|
||||
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": "放置了流体"}]
|
||||
@@ -0,0 +1,2 @@
|
||||
## 调试
|
||||
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": "放置了方块"}]
|
||||
@@ -41,8 +41,5 @@ scoreboard objectives add fzsd.event.used_tool.wooden_sword minecraft.used:woode
|
||||
scoreboard objectives add fzsd.event.used_tool.diamond_sword minecraft.used:diamond_sword
|
||||
scoreboard objectives add fzsd.event.used_tool.netherite_sword minecraft.used:netherite_sword
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fzsd:installed fzsd.event set value 1b
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装系统组件:游戏事件"}]
|
||||
@@ -1,3 +1,3 @@
|
||||
scoreboard players add @a[predicate=fzsd:is_real_player] fz.event.play_ticks 1
|
||||
scoreboard players add @a[predicate=fzsd:is_real_player] fzsd.event.play_ticks 1
|
||||
function #fzsd:game_event/on_tick
|
||||
schedule function fzsd:game_event/on_tick 1t replace
|
||||
+1
-4
@@ -30,7 +30,4 @@ scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.eve
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.wooden_pickaxe
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.wooden_shovel
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.wooden_sword
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.offset
|
||||
|
||||
## 判断分数
|
||||
execute unless score fzsd.var.score fzsd.variable.integer matches ..0 run function fzsd:game_event/player/on_broke_block_with_tool
|
||||
scoreboard players operation fzsd.var.score fzsd.variable.integer += @s fzsd.event.used_tool.dig_offset
|
||||
@@ -0,0 +1,2 @@
|
||||
## 判断分数
|
||||
execute unless score fzsd.var.score fzsd.variable.integer matches ..0 run function fzsd:game_event/player/on_broke_block_with_tool
|
||||
@@ -1,4 +1,4 @@
|
||||
scoreboard players set @s fzsd.event.used_tool.offset 0
|
||||
scoreboard players set @s fzsd.event.used_tool.dig_offset 0
|
||||
scoreboard players set @s fzsd.event.used_tool.diamond_axe 0
|
||||
scoreboard players set @s fzsd.event.used_tool.diamond_hoe 0
|
||||
scoreboard players set @s fzsd.event.used_tool.diamond_pickaxe 0
|
||||
|
||||
@@ -42,8 +42,5 @@ scoreboard objectives remove fzsd.event.used_tool.netherite_sword
|
||||
|
||||
schedule clear fzsd:game_event/on_tick
|
||||
|
||||
## 删除安装标记
|
||||
data remove storage fzsd:installed fzsd.event
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载系统组件:游戏事件"}]
|
||||
@@ -24,8 +24,5 @@ execute unless data storage fzsd:logger fzsd.levels.current run data modify stor
|
||||
## 读取日志等级存入缓存
|
||||
execute store result score fzsd.logger.level fzsd.variable.integer run data get storage fzsd:logger fzsd.levels.current
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fzsd:installed fzsd.logger set value 1b
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装系统组件:日志"}]
|
||||
@@ -1,8 +1,5 @@
|
||||
## 调用者:#fzsd:logger/uninstall
|
||||
|
||||
## 删除安装标记
|
||||
data remove storage fzsd:installed fzsd.logger
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载系统组件:日志"}]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ scoreboard objectives add fzsd.module.health health
|
||||
scoreboard objectives modify fzsd.module.health rendertype hearts
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fzsd:installed fzsd.module.health set value 1b
|
||||
data modify storage fzsd:install fzsd.module.health 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": "已安装组件:血量显示"}]
|
||||
@@ -2,3 +2,6 @@ execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0
|
||||
execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName
|
||||
execute unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health
|
||||
execute if data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list
|
||||
|
||||
## 日志
|
||||
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 @@
|
||||
execute unless data storage fzsd:install fzsd.module{health:0b} run function #fzsd:module/health/install
|
||||
@@ -0,0 +1,2 @@
|
||||
## 判断是否安装,如果安装则加载
|
||||
execute if data storage fzsd:install fzsd.module{health:1b} run function #fzsd:module/health/load
|
||||
@@ -2,7 +2,7 @@ scoreboard objectives remove fzsd.module.health
|
||||
data remove storage fzsd:config fzsd.module.health
|
||||
|
||||
## 标记为已卸载
|
||||
data modify storage fzsd:installed fzsd.module.health set value 0b
|
||||
data modify storage fzsd:install fzsd.module.health set value 0b
|
||||
|
||||
|
||||
## 日志
|
||||
|
||||
@@ -3,4 +3,4 @@ execute store result storage fzsd:here fzsd.nether.x int 0.125 run data get enti
|
||||
execute store result storage fzsd:here fzsd.nether.z int 0.125 run data get entity @s Pos[2]
|
||||
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:the_nether"
|
||||
function #fzsd:api/get_dimension_name
|
||||
data modify storage fzsd:here fzsd.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.nether.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.nether.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.nether.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.nether.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||
@@ -3,4 +3,5 @@ execute store result storage fzsd:here fzsd.overworld.x int 8 run data get entit
|
||||
execute store result storage fzsd:here fzsd.overworld.z int 8 run data get entity @s Pos[2]
|
||||
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld"
|
||||
function #fzsd:api/get_dimension_name
|
||||
data modify storage fzsd:here fzsd.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.overworld.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.overworld.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.overworld.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.overworld.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||
## 恢复用于判断的维度id
|
||||
@@ -1 +1 @@
|
||||
execute if data storage fzsd:global fzsd.api.dimension{id:"minecraft:overworld"} run function fzsd:module/here/get_dimension_message/if_overworld
|
||||
execute if data entity @s {Dimension:"minecraft:overworld"} run function fzsd:module/here/get_dimension_message/if_overworld
|
||||
@@ -1 +1 @@
|
||||
execute if data storage fzsd:global fzsd.api.dimension{id:"minecraft:the_nether"} run function fzsd:module/here/get_dimension_message/if_the_nether
|
||||
execute if data entity @s {Dimension:"minecraft:the_nether"} run function fzsd:module/here/get_dimension_message/if_the_nether
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user