Compare commits

..

15 Commits

Author SHA1 Message Date
Harvey_Husky e57961e031 3.1.8 2024-05-15 19:54:46 +08:00
Harvey_Husky d6124efa12 1.20.6 2024-05-12 22:03:28 +08:00
Harvey_Husky 218b24b4a4 update README.md 2024-02-02 14:13:28 +08:00
Harvey_Husky 56b2a16634 修复执行卸载后消息刷屏的bug;修复交互器打开方式选项不显示、不起效的bug;为每个玩家添加幻翼预警开关;修复一些消息的格式问题。 2024-02-02 14:08:51 +08:00
Harvey_Husky fd706b77bc 这回对了 2024-01-11 19:07:04 +08:00
Harvey_Husky 39711d3e01 脚本:避免历史遗留的负分玩家污染计分板 2024-01-11 19:04:25 +08:00
延皓 51c667c392 update README.md.
Signed-off-by: 延皓 <harvey_husky@foxmail.com>
2023-12-30 11:50:11 +00:00
延皓 48a2fd7cb5 update README.md.
Signed-off-by: 延皓 <harvey_husky@foxmail.com>
2023-12-12 01:32:07 +00:00
Harvey_Husky 0b41cddbf8 __on_player_command事件仍然不能取消 2023-12-09 09:57:20 +08:00
Harvey_Husky 52f182a02f 支持1.20-1.20.4;修复血量显示失效 2023-12-09 09:19:14 +08:00
延皓 78451c559e update README.md.
Signed-off-by: 延皓 <harvey_husky@foxmail.com>
2023-12-08 11:41:32 +00:00
延皓 0fa1c6ae32 留言
Signed-off-by: 延皓 <harvey_husky@foxmail.com>
2023-11-14 06:05:47 +00:00
Harvey_Husky f2d84334fe 1.20.2 2023-10-01 03:57:37 +08:00
Harvey_Husky f3cee3baef support 1.20.2 2023-10-01 03:55:00 +08:00
Harvey_Husky 63efa94335 补充缺失的去皮原木标签 2023-09-03 20:54:47 +08:00
53 changed files with 400 additions and 178 deletions
+21 -2
View File
@@ -17,6 +17,25 @@
"storageText": "{\"nbt\": \"${1:NBT}\", \"interpret\": true, \"storage\": \"${2:A namespaced ID}\"}", "storageText": "{\"nbt\": \"${1:NBT}\", \"interpret\": true, \"storage\": \"${2:A namespaced ID}\"}",
"ifInstalled": "execute if data storage fzsd:installed fzsd.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.exclude": [
"datapack.env.dataVersion": "1.20" "data/fzsd/functions/system/carpet/*"
],
"datapack.lint.blockStateCommaSpacing": {
"before": 0,
"after": 1
},
"datapack.lint.blockStateEqualSpacing": {
"before": 1,
"after": 1
},
"datapack.lint.selectorCommaSpacing": {
"before": 0,
"after": 1
},
"datapack.lint.selectorEqualSpacing": {
"before": 1,
"after": 1
},
"datapack.env.cmdVersion": "1.20.3",
"datapack.env.dataVersion": "1.20.6"
} }
+23 -5
View File
@@ -1,73 +1,85 @@
# 开发文档 # 开发文档
## 指引 ## 指引
- `函数`,指数据包`<命名空间>/functions`目录下的`.mcfunction`文件 - `函数`,指数据包`<命名空间>/functions`目录下的`.mcfunction`文件
- `标签`,指数据包`<命名空间>/tags`目录下的`.json`文件 - `标签`,指数据包`<命名空间>/tags`目录下的`.json`文件
- `覆盖标签并填入函数`时,`replace``true` - `覆盖标签并填入函数`时,`replace``true`
``` json ``` json
{ {
"replace": true, "replace": true,
"values": ... "values": ...
} }
``` ```
- `向标签中注册函数`时,`replace`为`false` - `向标签中注册函数`时,`replace`为`false`
``` json ``` json
{ {
"replace": false, "replace": false,
"values": ... "values": ...
} }
``` ```
- ***函数和标签是否能被扩展数据包成功覆盖,取决于数据包加载顺序***,请使用`/datapack enable <xxx> after <xxx>`指令,使您的扩展数据包在FZ's Survival Datapack之后加载 - ***函数和标签是否能被扩展数据包成功覆盖,取决于数据包加载顺序***,请使用`/datapack enable <xxx> after <xxx>`指令,使您的扩展数据包在FZ's Survival Datapack之后加载
## 基本要求 ## 基本要求
- 函数由两个以上的函数调用,或由不同包下的函数调用,或需要作为接口开放给下游数据包时,应改用标签调用! - 函数由两个以上的函数调用,或由不同包下的函数调用,或需要作为接口开放给下游数据包时,应改用标签调用!
- 函数调用尽量不要使用`function`命令,应改在标签中按顺序调用! - 函数调用尽量不要使用`function`命令,应改在标签中按顺序调用!
## 系统模块 ## 系统模块
### 频繁使用的计算单元 ### 频繁使用的计算单元
- [`#fzsd:calculation/*`](data/fzsd/tags/functions/calculation/)标签通常被用来进行简单重复的计算任务 - [`#fzsd:calculation/*`](data/fzsd/tags/functions/calculation/)标签通常被用来进行简单重复的计算任务
### 事件模块 ### 事件模块
- 通常由**进度**触发,触发后调用同名的事件标签 - 通常由**进度**触发,触发后调用同名的事件标签
- 在[`#fzsd:game_event/(<...>/)on_<事件>`](data/fzsd/tags/functions/game_event/)标签中注册触发时需要调用的函数即可 - 在[`#fzsd:game_event/(<...>/)on_<事件>`](data/fzsd/tags/functions/game_event/)标签中注册触发时需要调用的函数即可
### 日志模块 ### 日志模块
- 仓库中提供了日志相关的代码片段,位于[`.vscode/settings.json`](.vscode/settings.json) - 仓库中提供了日志相关的代码片段,位于[`.vscode/settings.json`](.vscode/settings.json)
- 暂时没有找到方法在服务端控制台打印日志,但会被记录在客户端 - 暂时没有找到方法在服务端控制台打印日志,但会被记录在客户端
#### 详细 Fine #### 详细 Fine
- 等级:300 - 等级:300
- 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"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": "你的日志"}`
#### 调试 Debug #### 调试 Debug
- 等级:400 - 等级:400
- 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "你的日志"}` - 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "你的日志"}`
#### 信息 Info #### 信息 Info
- 等级:500 - 等级:500
- 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "你的日志"}` - 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "你的日志"}`
#### 提醒 Alert #### 提醒 Alert
- 等级:600 - 等级:600
- 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..600 run tellraw @a [{"nbt": "fzsd.level.alert", "interpret": true, "storage": "fzsd:logger"}, {"text": "你的日志"}` - 使用方法:`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 #### 意外 Exception
- 暂不提供 - 暂不提供
#### 错误 Error #### 错误 Error
- 等级:800 - 等级:800
- 使用方法:`execute if score fzsd.logger.level fzsd.variable.integer matches ..800 run tellraw @a [{"nbt": "fzsd.level.error", "interpret": true, "storage": "fzsd:logger"}, {"text": "你的日志"}` - 使用方法:`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. 定义一个显示按钮时执行的函数,使用形如`tellraw @s {"text": "[按钮]", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set <触发器分数>"}}`的指令定义按钮。 1. 定义一个显示按钮时执行的函数,使用形如`tellraw @s {"text": "[按钮]", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set <触发器分数>"}}`的指令定义按钮。
- *触发器分数为正数会重新向玩家发送交互按钮,如不想重新发送,请使用负数* - *触发器分数为正数会重新向玩家发送交互按钮,如不想重新发送,请使用负数*
- 大多数情况下这里的触发器分数必须是独一无二的 - 大多数情况下这里的触发器分数必须是独一无二的
@@ -77,19 +89,23 @@
4. 在[`#fzsd:module/interactor/event/on_click`](data/fzsd/tags/functions/module/interactor/event/on_click.json)标签中注册上述函数 4. 在[`#fzsd:module/interactor/event/on_click`](data/fzsd/tags/functions/module/interactor/event/on_click.json)标签中注册上述函数
#### 其他标签 #### 其他标签
- 标签[`#fzsd:module/interactor/reset_trigger`](data/fzsd/tags/functions/module/interactor/reset_trigger.json):重置玩家`@s`的触发器计分板 - 标签[`#fzsd:module/interactor/reset_trigger`](data/fzsd/tags/functions/module/interactor/reset_trigger.json):重置玩家`@s`的触发器计分板
### 计分板模块 ### 计分板模块
#### 自定义计分板颜色 #### 自定义计分板颜色
- 数据包提供了所有计分板的全部16色命名函数 - 数据包提供了所有计分板的全部16色命名函数
- 使用方法:**覆盖**[`#fzsd:module/scoreboard/display/set_text/<计分板名称>`](data/fzsd/tags/functions/module/scoreboard/display/set_text/)标签,填入[`fzsd:module/scoreboard/display/set_text/<计分板名称>/<颜色名称>`](data/fzsd/functions/module/scoreboard/display/set_text/)函数 - 使用方法:**覆盖**[`#fzsd:module/scoreboard/display/set_text/<计分板名称>`](data/fzsd/tags/functions/module/scoreboard/display/set_text/)标签,填入[`fzsd:module/scoreboard/display/set_text/<计分板名称>/<颜色名称>`](data/fzsd/functions/module/scoreboard/display/set_text/)函数
#### 自定义计分板名称 #### 自定义计分板名称
1. 定义一个设置计分板颜色、文本的函数,格式可以参考[`fzsd:module/scoreboard/display/set_text/general/*`](data/fzsd/functions/module/scoreboard/display/set_text/general/)函数 1. 定义一个设置计分板颜色、文本的函数,格式可以参考[`fzsd:module/scoreboard/display/set_text/general/*`](data/fzsd/functions/module/scoreboard/display/set_text/general/)函数
2. **覆盖**[`#fzsd:module/scoreboard/display/set_text/<计分板名称>`](data/fzsd/tags/functions/module/scoreboard/display/set_text/)标签,填入上述函数 2. **覆盖**[`#fzsd:module/scoreboard/display/set_text/<计分板名称>`](data/fzsd/tags/functions/module/scoreboard/display/set_text/)标签,填入上述函数
#### 扩展自己的计分板 #### 扩展自己的计分板
1. 定义一个安装函数,参考[`fzsd:module/scoreboard/install`](data/fzsd/functions/module/scoreboard/install.mcfunction)函数 1. 定义一个安装函数,参考[`fzsd:module/scoreboard/install`](data/fzsd/functions/module/scoreboard/install.mcfunction)函数
2. 在[`#fzsd:module/scoreboard/install`](data/fzsd/tags/functions/module/scoreboard/install.json)标签中注册该函数 2. 在[`#fzsd:module/scoreboard/install`](data/fzsd/tags/functions/module/scoreboard/install.json)标签中注册该函数
3. 按照“自定义计分板颜色”和“自定义计分板名称”中的操作,定义你的计分板颜色和名称 3. 按照“自定义计分板颜色”和“自定义计分板名称”中的操作,定义你的计分板颜色和名称
@@ -99,18 +115,20 @@
7. 定义一个用来判断在轮播时是否轮到你的计分板的函数,在判断后调用上一条中的函数,参考[`fzsd:module/scoreboard/display/carousel/try_display/*`](data/fzsd/functions/module/scoreboard/display/carousel/try_display/activation.mcfunction)函数 7. 定义一个用来判断在轮播时是否轮到你的计分板的函数,在判断后调用上一条中的函数,参考[`fzsd:module/scoreboard/display/carousel/try_display/*`](data/fzsd/functions/module/scoreboard/display/carousel/try_display/activation.mcfunction)函数
8. 将该函数注册到[`#fzsd:module/scoreboard/display/try_display`](data/fzsd/tags/functions/module/scoreboard/display/carousel/try_display.json)标签中 8. 将该函数注册到[`#fzsd:module/scoreboard/display/try_display`](data/fzsd/tags/functions/module/scoreboard/display/carousel/try_display.json)标签中
## 自定义模块 ## 自定义模块
### 排除假人 ### 排除假人
- 如果您不想对假人执行您的命令,请将以下语句添加在您要执行的命令之前: - 如果您不想对假人执行您的命令,请将以下语句添加在您要执行的命令之前:
<pre><code><font color=ee82ee>execute </font><font color=1e90ff>if predicate </font><font color=f0e68c>fzsd:is_real_player</font></code></pre> <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) - [`#fzsd:system/install/module`](data/fzsd/tags/functions/system/install/module.json)
- [`#fzsd:system/uninstall/module`](data/fzsd/tags/functions/system/uninstall/module.json) - [`#fzsd:system/uninstall/module`](data/fzsd/tags/functions/system/uninstall/module.json)
- [`#fzsd:system/load/module`](data/fzsd/tags/functions/system/load/module.json) - [`#fzsd:system/load/module`](data/fzsd/tags/functions/system/load/module.json)
#### 注册交互器按钮 #### 注册交互器按钮
- 见[交互器按钮](#按钮操作) - 见[交互器按钮](#按钮操作)
+13 -16
View File
@@ -1,31 +1,23 @@
# FZ生存数据包 # FZ生存数据包 v3.1
为FZ服务器写的Minecraft生存辅助数据包 为FZ服务器写的Minecraft生存辅助数据包
#### @Author: Harvey_Husky [![数据包版本](https://img.shields.io/badge/正式版-3.1.7-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [![MC版本](https://img.shields.io/badge/Minecraft-1.20+-blue.svg)](https://minecraft.net/)
#### Copyright (C) 2019-2023 Harvey_Husky > 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
## 安装教程 ## 安装教程
1. 兼容性 1. 兼容性
- `数据包 v3.1.x` 支持 `Minecraft 1.20.x` - `数据包 v3.1.x` 支持 `Minecraft 1.20.x`
- `数据包 v3.0.x` 支持 `Minecraft 1.18.2-1.19.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版本的数据包 2. 前往[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)下载对应MC版本的数据包
3. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks` 3. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`
4. (可选)下载并安装 [Carpet Mod **1.4.24**](https://github.com/gnembon/fabric-carpet/releases) 或以上版本 4. (可选)下载并安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases)
5. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` 5. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts`
- **注意:如果未正确安装该脚本,数据包会强制禁用 carpet mod 的 `player` 命令以避免假人污染记分板,需要在安装好脚本后手动启用 `player` 命令**
6. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload` 6. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`
# FZ生存数据包 3.1
[![数据包版本](https://img.shields.io/badge/正式版-3.1.4-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [![MC版本](https://img.shields.io/badge/Minecraft-1.20+-blue.svg)](https://minecraft.net/)
> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
## 功能 ## 功能
### 交互器 ### 交互器
@@ -77,11 +69,15 @@
- 如果你不知道 Carpet Mod 或 Carpet 脚本,请忽略本节 - 如果你不知道 Carpet Mod 或 Carpet 脚本,请忽略本节
- 需要安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases) - 需要安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases)
- 从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` - 从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts`
- **注意:如果未正确安装该脚本,数据包会强制禁用 carpet mod 的 `player` 命令以避免假人污染记分板,需要在安装好脚本后手动启用 `player` 命令**
- 脚本: - 脚本:
- `fzsd_score.sc` - `fzsd_score.sc`
- 可避免Carpet假人污染计分板 - 可避免Carpet假人污染计分板
- 可以标记哪些玩家是假人 - 可以标记哪些玩家是假人
- 子命令( `/fzsd_score <子命令>` ): - 子命令( `/fzsd_score <子命令>` ):
- ***使用前请务必备份存档!请报告不符预期的结果***
- ***使用前请务必备份存档!请报告不符预期的结果***
- ***使用前请务必备份存档!请报告不符预期的结果***
- `updateFrom <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!) - `updateFrom <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!)
- `recalculate`:重新计算所有计分板总分 - `recalculate`:重新计算所有计分板总分
- `recalculate <scoreboardID>`:重新计算该计分板总分 - `recalculate <scoreboardID>`:重新计算该计分板总分
@@ -96,6 +92,7 @@
- `commandPlayer <permissionType>`:设置player命令权限类型 - `commandPlayer <permissionType>`:设置player命令权限类型
### 幻翼预警 ### 幻翼预警
- 首次使用需要先睡一觉 - 首次使用需要先睡一觉
### 管理员 ### 管理员
@@ -106,9 +103,9 @@
- 扫地机 - 扫地机
- 获取当前维度和坐标(以及对应的主世界、下界坐标)(私信/广播) - 获取当前维度和坐标(以及对应的主世界、下界坐标)(私信/广播)
- 获取上次死亡维度和坐标(私信/广播 - 获取上次死亡维度和坐标(私信)
- 获取上次穿出的下界传送门坐标(私信/广播) - 获取上次穿出的下界传送门坐标(私信/广播)
- 获取生点维度和坐标(私信/广播 - 获取上个重生点维度和坐标(私信)
## 开发者相关 ## 开发者相关
@@ -0,0 +1,7 @@
execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name fzsd.module.health
execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name
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,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"
}
}
@@ -1,9 +1,8 @@
{ {
"parent": "fzsd:game_event", "parent": "fzsd:game_event/on_placed_block",
"criteria": { "criteria": {
"on_tools_exclude_axes_used_on_block": { "on_placed_liquid": {
"__comment": "斧子剥树皮会触发两次!", "trigger": "minecraft:placed_block",
"trigger": "minecraft:item_used_on_block",
"conditions": { "conditions": {
"location": [ "location": [
{ {
@@ -11,9 +10,11 @@
"name": "fzsd:is_real_player" "name": "fzsd:is_real_player"
}, },
{ {
"condition": "minecraft:match_tool", "condition": "minecraft:location_check",
"predicate": { "predicate": {
"tag": "fzsd:tools_exclude_axes" "block": {
"blocks": "#fzsd:liquid"
}
} }
} }
] ]
@@ -21,6 +22,6 @@
} }
}, },
"rewards": { "rewards": {
"function": "fzsd:game_event/advancement/on_tools_used_on_block" "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"
}
}
@@ -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"
}
}
@@ -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"
}
}
@@ -1,2 +1,2 @@
data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b
function #fzsd:module/health/try_load function fzsd:module/health/try_load
@@ -1,2 +1,2 @@
data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b
function #fzsd:module/health/try_load function fzsd:module/health/try_load
@@ -1,2 +1,2 @@
data modify storage fzsd:config fzsd.module.health.display.list set value 0b data modify storage fzsd:config fzsd.module.health.display.list set value 0b
function #fzsd:module/health/try_load function fzsd:module/health/try_load
@@ -1,2 +1,2 @@
data modify storage fzsd:config fzsd.module.health.display.list set value 1b data modify storage fzsd:config fzsd.module.health.display.list set value 1b
function #fzsd:module/health/try_load function fzsd:module/health/try_load
@@ -1,7 +1,7 @@
# 见#fzsd.extra.bbl:display/set_text # 见#fzsd.extra.bbl:display/set_text
data modify storage fzsd:module fzsd.scoreboard.text.bedrock_broken_count set value '{"text": "破基岩榜", "color": "purple"}' data modify storage fzsd:module fzsd.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 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"} 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 color light_purple
team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "purple"} team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "light_purple"}
@@ -1,34 +0,0 @@
{
"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"
}
}
@@ -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": {
"tag": "fzsd:tools_exclude_axes"
}
},
{
"condition": "minecraft:all_of",
"terms": [
{
"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"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.4'}} execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.8'}}
execute if data storage fzsd:version fzsd{need_update: 1b} run function fzsd:system/update 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:system/carpet/try_load_fzsd_score
function #fzsd:load function #fzsd:load
@@ -1,7 +1,7 @@
# 调用者:advancements/fzsd:~ # 调用者:advancements/fzsd:~
execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_login scoreboard players set @s fzsd.event.leave_game 0
execute if predicate fzsd:is_real_player if score @s fzsd.event.leave_game matches 0 run function fzsd:game_event/player/on_login
## ##
scoreboard players set @s fzsd.event.leave_game 0
function #fzsd:game_event/reset_all function #fzsd:game_event/reset_all
@@ -1,5 +1,8 @@
# 调用者:advancements/fzsd:~ # 调用者: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 function #fzsd:game_event/player/on_placed_block
## ##
@@ -10,5 +10,4 @@ scoreboard players remove @s fzsd.event.used_tool.dig_offset 1
function #fzsd:game_event/player/on_tools_used_on_block function #fzsd:game_event/player/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_used_on_block
advancement revoke @s from fzsd:game_event/on_tools_exclude_axes_used_on_block
@@ -1,5 +1,5 @@
## ##
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了工具"}] 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_used_tool function #fzsd:game_event/player/on_used_tool
@@ -1,3 +1,4 @@
## @see compat_16
execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fzsd.module.health execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fzsd.module.health
execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName 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 unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health
@@ -1,3 +1,3 @@
# 本目录用于存放向事件中注册的函数,并不用来新建事件 # 本目录用于存放向事件中注册的函数,并不用来新建事件
execute if data storage fzsd:install fzsd.module{interactor: 1b} unless score @s fzsd.module.interactor.player.config matches -1 if entity @s[x_rotation = -90] run function #fzsd:module/interactor/event/on_start_interact execute if data storage fzsd:install fzsd.module{interactor: 1b} if entity @s[tag=!fzsd.ignore_interactor_headup_sneak, x_rotation = -90] run function #fzsd:module/interactor/event/on_start_interact
@@ -1,7 +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": "显示交互器"}] 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": "显示交互器"}]
execute if data storage fzsd:installed fzsd.module{last_death:1b} run tellraw @s {"text": "交互器打开方式"} execute if data storage fzsd:install fzsd.module{interactor:1b} run tellraw @s {"text": "交互器:"}
execute if data storage fzsd:installed fzsd.module{last_death:1b} unless score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 900"}},{"text": "", "color": "green"},{"text": "]"}]] execute if data storage fzsd:install fzsd.module{interactor:1b} if entity @s[tag=!fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"text": "- 打开方式“抬头+蹲起"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 900"}},{"text": "已启", "color": "green"},{"text": "]"}]]
execute if data storage fzsd:installed fzsd.module{last_death:1b} if score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]] execute if data storage fzsd:install fzsd.module{interactor:1b} if entity @s[tag=fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"text": "- 打开方式“抬头+蹲起"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击启"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]]
@@ -3,6 +3,5 @@
## ##
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": "的交互器分数为:"}, {"score": {"name": "@s", "objective": "fzsd.module.interactor.trigger"}}] 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": "的交互器分数为:"}, {"score": {"name": "@s", "objective": "fzsd.module.interactor.trigger"}}]
execute if score @s fzsd.module.interactor.trigger matches 900 run scoreboard players set @s fzsd.module.interactor.player.config -1 execute if score @s fzsd.module.interactor.trigger matches 900 run tag @s add fzsd.ignore_interactor_headup_sneak
execute if score @s fzsd.module.interactor.trigger matches 910 run tag @s remove fzsd.ignore_interactor_headup_sneak
execute if score @s fzsd.module.interactor.trigger matches 910 run scoreboard players set @s fzsd.module.interactor.player.config 0
@@ -1,5 +1,5 @@
tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "本服务器启用了"}, {"text": "FZ生存数据包", "color": "gold", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击前往数据包gitee主页"}}, "clickEvent": {"action": "open_url", "value": "https://gitee.com/harvey-husky/fz-survival-datapack"}}]] tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "本服务器启用了"}, {"text": "FZ生存数据包", "color": "gold", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击前往数据包gitee主页"}}, "clickEvent": {"action": "open_url", "value": "https://gitee.com/harvey-husky/fz-survival-datapack"}}]]
## ##
execute unless score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "抬头90°并蹲起,或使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]] execute if entity @s[tag=!fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "抬头90°并蹲起,或使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]]
## ##
execute if score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]] execute if entity @s[tag=fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]]
@@ -1,3 +1,4 @@
# TODO: 数字有待商榷 # TODO: 数字有待商榷
## @s this player
function #fzsd:api/get_time_since_rest function #fzsd:api/get_time_since_rest
execute if score fzsd.var.cache fzsd.variable.integer matches 61766.. run function #fzsd:module/phantom_warning/send_phantom_warning execute if score fzsd.var.cache fzsd.variable.integer matches 61766.. if entity @s[tag=!fzsd.ignore_phantom_warning] run function #fzsd:module/phantom_warning/send_phantom_warning
@@ -0,0 +1 @@
execute if data storage fzsd:install fzsd.module{phantom_warning:1b} run function fzsd:module/phantom_warning/interactor/display_0
@@ -0,0 +1,2 @@
tellraw @s[tag=!fzsd.ignore_phantom_warning] [{"text": "幻翼预警:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 4000"}}, {"text": "已启用", "color": "green"}, {"text": "]", "color": "gray"}]]
tellraw @s[tag=fzsd.ignore_phantom_warning] [{"text": "幻翼预警:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 4001"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
@@ -0,0 +1,2 @@
execute if score @s fzsd.module.interactor.trigger matches 4000 run tag @s add fzsd.ignore_phantom_warning
execute if score @s fzsd.module.interactor.trigger matches 4001 run tag @s remove fzsd.ignore_phantom_warning
@@ -1,3 +1,4 @@
# 调用者:tags\functions\module\phantom_warning\send_phantom_warning.json
## ##
execute if score fzsd.logger.level fzsd.variable.integer matches ..600 run tellraw @s [{"nbt": "fzsd.level.alert", "interpret": true, "storage": "fzsd:logger"}, {"text": "今晚可能会生成幻翼,建议睡觉!"}] execute if score fzsd.logger.level fzsd.variable.integer matches ..600 run tellraw @s [{"nbt": "fzsd.level.alert", "interpret": true, "storage": "fzsd:logger"}, {"text": "今晚可能会生成幻翼,建议睡觉!"}]
@@ -1,12 +1,12 @@
tellraw @s [{"text": "扫地机:"}] tellraw @s [{"text": "扫地机:"}]
tellraw @s[tag=!fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3400"}}, {"text": "", "color": "green"}, {"text": "]", "color": "gray"}]] tellraw @s[tag=!fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3400"}}, {"text": "已启", "color": "green"}, {"text": "]", "color": "gray"}]]
tellraw @s[tag=fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3401"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]] tellraw @s[tag=fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3401"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
tellraw @s[tag=!fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3500"}}, {"text": "", "color": "green"}, {"text": "]", "color": "gray"}]] tellraw @s[tag=!fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3500"}}, {"text": "已启", "color": "green"}, {"text": "]", "color": "gray"}]]
tellraw @s[tag=fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3501"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]] tellraw @s[tag=fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3501"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
tellraw @s[tag=!fzsd.ignore_sweeper_message] [{"text": "- 消息"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3600"}}, {"text": "", "color": "green"}, {"text": "]", "color": "gray"}]] tellraw @s[tag=!fzsd.ignore_sweeper_message] [{"text": "- 聊天栏"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3600"}}, {"text": "已启", "color": "green"}, {"text": "]", "color": "gray"}]]
tellraw @s[tag=fzsd.ignore_sweeper_message] [{"text": "- 消息"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3601"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]] tellraw @s[tag=fzsd.ignore_sweeper_message] [{"text": "- 聊天栏"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3601"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
tellraw @s [{"text": "- 开关:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3000"}}, {"text": "", "color": "red"}, {"text": "]"}], [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3300"}}, {"text": "清理一次", "color": "aqua"}, {"text": "]", "color": "gray"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "10s", "color": "#aa0000"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3010"}}, {"text": "10s", "color": "#aa0000"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "30s", "color": "#da7924"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3030"}}, {"text": "30s", "color": "#da7924"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "1min", "color": "#ffe34c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3060"}}, {"text": "1min", "color": "#ffe34c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "2min", "color": "#e3ff50"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3120"}}, {"text": "2min", "color": "#e3ff50"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "3min", "color": "#81d42c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3180"}}, {"text": "3min", "color": "#81d42c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "4min", "color": "#00aa00"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3240"}}, {"text": "4min", "color": "#00aa00"}, {"text": "]"}]] tellraw @s [{"text": "- 开关:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3000"}}, {"text": "", "color": "red"}, {"text": "]"}], [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3300"}}, {"text": "清理一次", "color": "aqua"}, {"text": "]", "color": "gray"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "10s", "color": "#aa0000"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3010"}}, {"text": "10s", "color": "#aa0000"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "30s", "color": "#da7924"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3030"}}, {"text": "30s", "color": "#da7924"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "1min", "color": "#ffe34c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3060"}}, {"text": "1min", "color": "#ffe34c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "2min", "color": "#e3ff50"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3120"}}, {"text": "2min", "color": "#e3ff50"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "3min", "color": "#81d42c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3180"}}, {"text": "3min", "color": "#81d42c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "4min", "color": "#00aa00"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3240"}}, {"text": "4min", "color": "#00aa00"}, {"text": "]"}]]
@@ -1,3 +1,4 @@
# 这个文件并不会自动执行,有需要可以手动执行
carpet setDefault language zh_cn carpet setDefault language zh_cn
carpet setDefault stackableShulkerBoxes 16 carpet setDefault stackableShulkerBoxes 16
carpet setDefault leadFix true carpet setDefault leadFix true
@@ -1,2 +1,7 @@
## ##
scoreboard objectives add fzsd.variable.integer dummy scoreboard objectives add fzsd.variable.integer dummy
scoreboard players set -1 fzsd.variable.integer -1
scoreboard players set 10 fzsd.variable.integer 10
scoreboard players set 200 fzsd.variable.integer 200
scoreboard players set 24000 fzsd.variable.integer 24000
scoreboard players set 72000 fzsd.variable.integer 72000
@@ -1,48 +0,0 @@
{
"condition": "minecraft:any_of",
"terms": [
{
"__comment": "主手==斧子",
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"tag": "fzsd:tool/axes"
}
}
}
},
{
"__comment": "主手!=工具&&副手==斧子",
"condition": "minecraft:all_of",
"terms": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"tag": "fzsd:tools"
}
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"tag": "fzsd:tool/axes"
}
}
}
}
]
}
]
}
+3 -1
View File
@@ -18,6 +18,8 @@
"minecraft:stripped_warped_hyphae", "minecraft:stripped_warped_hyphae",
"minecraft:stripped_warped_stem", "minecraft:stripped_warped_stem",
"minecraft:stripped_cherry_log", "minecraft:stripped_cherry_log",
"minecraft:stripped_cherry_wood" "minecraft:stripped_cherry_wood",
"minecraft:stripped_mangrove_log",
"minecraft:stripped_mangrove_wood"
] ]
} }
@@ -7,6 +7,7 @@
"#fzsd:module/last_death/interactor/on_click", "#fzsd:module/last_death/interactor/on_click",
"#fzsd:module/last_nether_portal/interactor/on_click", "#fzsd:module/last_nether_portal/interactor/on_click",
"#fzsd:module/last_spawn_point/interactor/on_click", "#fzsd:module/last_spawn_point/interactor/on_click",
"#fzsd:module/sweeper/interactor/on_click" "#fzsd:module/sweeper/interactor/on_click",
"#fzsd:module/phantom_warning/interactor/on_click"
] ]
} }
@@ -8,6 +8,7 @@
"#fzsd:module/last_death/interactor/display", "#fzsd:module/last_death/interactor/display",
"#fzsd:module/last_nether_portal/interactor/display", "#fzsd:module/last_nether_portal/interactor/display",
"#fzsd:module/last_spawn_point/interactor/display", "#fzsd:module/last_spawn_point/interactor/display",
"#fzsd:module/sweeper/interactor/display" "#fzsd:module/sweeper/interactor/display",
"#fzsd:module/phantom_warning/interactor/display"
] ]
} }
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:module/phantom_warning/interactor/display"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:module/phantom_warning/interactor/on_click"
]
}
@@ -1,5 +1,6 @@
{ {
"replace": false, "replace": false,
"__comment": "调用者:data/fzsd/functions/module/phantom_warning/check_time_since_rest.mcfunction",
"values": [ "values": [
"fzsd:module/phantom_warning/send_phantom_warning" "fzsd:module/phantom_warning/send_phantom_warning"
] ]
@@ -1,6 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"fzsd:module/scoreboard/display/set_text/placement_count/dark_green" "fzsd:module/scoreboard/display/set_text/placement_count/dark_blue"
] ]
} }
@@ -8,6 +8,6 @@
"replace": false, "replace": false,
"__comment_values": "此处只能填写一个函数!", "__comment_values": "此处只能填写一个函数!",
"values": [ "values": [
"fzsd:module/scoreboard/display/set_text/trade_count/green" "fzsd:module/scoreboard/display/set_text/trade_count/dark_green"
] ]
} }
@@ -2,7 +2,7 @@
"replace": false, "replace": false,
"values": [ "values": [
"fzsd:module/sweeper/clear", "fzsd:module/sweeper/clear",
"fzsd:module/sweeper/post_loop", "fzsd:module/sweeper/pre_loop",
"fzsd:module/sweeper/start_timer", "fzsd:module/sweeper/start_timer",
"fzsd:module/sweeper/bossbar" "fzsd:module/sweeper/bossbar"
] ]
+23 -1
View File
@@ -1,6 +1,28 @@
{ {
"pack": { "pack": {
"description": "FZ Survival Datapack 3.1 | Author: Harvey_Husky", "description": "FZ Survival Datapack 3.1 | Author: Harvey_Husky",
"pack_format": 15 "pack_format": 15,
"supported_formats": {
"min_inclusive": 15,
"max_inclusive": 41
}
},
"overlays": {
"entries": [
{
"formats": {
"min_inclusive": 16,
"max_inclusive": 26
},
"directory": "compat_16"
},
{
"formats": {
"min_inclusive": 27,
"max_inclusive": 41
},
"directory": "compat_27"
}
]
} }
} }
+4 -4
View File
@@ -128,7 +128,7 @@ __on_close() -> (
write_file('team_cache', 'json', global_team_cache); write_file('team_cache', 'json', global_team_cache);
); );
if(require_version('1.4.112'), // 新功能支持 if(require_version('1.4.999'), // 支持
__on_player_command(player, command) -> ( __on_player_command(player, command) -> (
l = length(command); l = length(command);
if(l > 13 if(l > 13
@@ -199,8 +199,8 @@ reload_configs() -> (
global_config:'config_version' = '1.0.0'; // 占位用无实际作用 global_config:'config_version' = '1.0.0'; // 占位用无实际作用
config_changed = true; config_changed = true;
); );
// 新功能支持 // 支持
if(require_version('1.4.112') && !contains(global_config, 'allow_spawn_whitelist_player'), if(require_version('1.4.999') && !contains(global_config, 'allow_spawn_whitelist_player'),
global_config:'allow_spawn_whitelist_player' = false; global_config:'allow_spawn_whitelist_player' = false;
config_changed = true; config_changed = true;
); );
@@ -428,7 +428,7 @@ command_recalculate_total_score(scoreboard) -> (
for(scoreboard(scoreboard), for(scoreboard(scoreboard),
if(_ != total_score_name_new, if(_ != total_score_name_new,
current_player_score = scoreboard(scoreboard, _); current_player_score = scoreboard(scoreboard, _);
if(current_player_score < 0, // 避免溢出 if(current_player_score < -1000000000, // 避免溢出
current_player_score = 2147483647; current_player_score = 2147483647;
scoreboard(scoreboard, _, 2147483647); scoreboard(scoreboard, _, 2147483647);
); );