Compare commits
68 Commits
v3.0-beta.1
...
v3.0.6
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| d2222c9899 | |||
| 3633138d13 | |||
| a351e5a831 | |||
| 3f4df874e6 | |||
| da7af9fc83 | |||
| 08d3d01b18 | |||
| dfe06e506c | |||
| 3ce37c9abf | |||
| 5520832d55 | |||
| 696adfa9d7 | |||
| 4ef9270a21 |
@@ -1,9 +0,0 @@
|
|||||||
data/minecraft/advancements
|
|
||||||
data/minecraft/loot_tables
|
|
||||||
data/minecraft/recipes
|
|
||||||
data/minecraft/tags/blocks
|
|
||||||
data/minecraft/tags/entity_types
|
|
||||||
data/minecraft/tags/fluids
|
|
||||||
data/minecraft/tags/game_events
|
|
||||||
data/minecraft/tags/items
|
|
||||||
data/minecraft/tags/worldgen
|
|
||||||
Vendored
+10
-7
@@ -8,13 +8,16 @@
|
|||||||
"tagRemove": "tag ${1:target} remove ${2:tag}",
|
"tagRemove": "tag ${1:target} remove ${2:tag}",
|
||||||
"dataModifyStorageFromSelf": "data modify storage ${1:id} ${2:path} set from entity @s ${3:path}",
|
"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}\"]}",
|
"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}\"}",
|
"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 fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{\"nbt\": \"fz.level.debug\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_debug}\"}]",
|
"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 fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{\"nbt\": \"fz.level.info\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_info}\"}]",
|
"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 fz.logger.level fz.variable.integer matches ..600 run tellraw @a [{\"nbt\": \"fz.level.alert\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_alert}\"}]",
|
"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 fz.logger.level fz.variable.integer matches ..800 run tellraw @a [{\"nbt\": \"fz.level.error\", \"interpret\": true, \"storage\": \"fz:logger\"}, {\"text\": \"${1:log_error}\"}]",
|
"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}\"}",
|
"TEXT": "{\"text\": \"${1:TEXT}\", \"color\": \"${2:COLOR}\"}",
|
||||||
"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 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.19",
|
||||||
|
"datapack.env.jsonVersion": "1.19",
|
||||||
|
"datapack.env.dataVersion": "1.19"
|
||||||
}
|
}
|
||||||
@@ -5,40 +5,35 @@
|
|||||||
- `函数`,指数据包`<命名空间>/functions`目录下的`.mcfunction`文件
|
- `函数`,指数据包`<命名空间>/functions`目录下的`.mcfunction`文件
|
||||||
- `标签`,指数据包`<命名空间>/tags`目录下的`.json`文件
|
- `标签`,指数据包`<命名空间>/tags`目录下的`.json`文件
|
||||||
- `覆盖标签并填入函数`时,`replace`为`true`
|
- `覆盖标签并填入函数`时,`replace`为`true`
|
||||||
```
|
``` json
|
||||||
{
|
{
|
||||||
"replace": true,
|
"replace": true,
|
||||||
"values": ...
|
"values": ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
- `向标签中注册函数`时,`replace`为`false`
|
- `向标签中注册函数`时,`replace`为`false`
|
||||||
```
|
``` json
|
||||||
{
|
{
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": ...
|
"values": ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
- ***函数和标签是否能被扩展数据包成功覆盖,取决于数据包加载顺序***,请使用`/datapack enable <xxx> after <xxx>`指令,使您的扩展数据包在FZ's Survival Datapack之后加载
|
||||||
|
|
||||||
|
|
||||||
## 基本要求
|
## 基本要求
|
||||||
- 接口逻辑和模块逻辑分离
|
|
||||||
- 函数由两个以上的函数调用,或由不同包下的函数调用,或需要作为接口开放给下游数据包时,应改用标签调用!
|
- 函数由两个以上的函数调用,或由不同包下的函数调用,或需要作为接口开放给下游数据包时,应改用标签调用!
|
||||||
- 函数调用尽量不要使用`function`命令,应改在标签中按顺序调用!
|
- 函数调用尽量不要使用`function`命令,应改在标签中按顺序调用!
|
||||||
|
|
||||||
|
|
||||||
## 未来计划
|
|
||||||
- 细化版本管理,提供不同版本之间的升级函数,由`update_manager`控制。*务必仔细测试再发布,一旦升级无法降级!*
|
|
||||||
- playerdata相关功能
|
|
||||||
|
|
||||||
|
|
||||||
## 系统模块
|
## 系统模块
|
||||||
|
|
||||||
### 频繁使用的计算单元
|
### 频繁使用的计算单元
|
||||||
- [`#fz:calculation/*`](data/fz/tags/functions/calculation/)标签通常被用来进行简单重复的计算任务
|
- [`#fzsd:calculation/*`](data/fzsd/tags/functions/calculation/)标签通常被用来进行简单重复的计算任务
|
||||||
|
|
||||||
### 事件模块
|
### 事件模块
|
||||||
- 通常由**进度**触发,触发后调用同名的事件标签
|
- 通常由**进度**触发,触发后调用同名的事件标签
|
||||||
- 在[`#fz:game_event/(<...>/)on_<事件>`](data/fz/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)
|
||||||
@@ -46,71 +41,76 @@
|
|||||||
|
|
||||||
#### 详细 Fine
|
#### 详细 Fine
|
||||||
- 等级:300
|
- 等级:300
|
||||||
- 使用方法:`execute if score fz.logger.level fz.variable.integer matches ..300 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz: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 fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz: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 fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz: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 fz.logger.level fz.variable.integer matches ..600 run tellraw @a [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz: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 fz.logger.level fz.variable.integer matches ..800 run tellraw @a [{"nbt": "fz.level.error", "interpret": true, "storage": "fz: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 fz.module.config.trigger set <触发器分数>"}}`的指令定义按钮。**大多数情况下这里的触发器分数必须是独一无二的**
|
1. 定义一个显示按钮时执行的函数,使用形如`tellraw @s {"text": "[按钮]", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set <触发器分数>"}}`的指令定义按钮。
|
||||||
2. 在[`#fz:module/config/display`](data/fz/tags/functions/module/config/display.json)标签中注册上述函数
|
- *触发器分数为正数会重新向玩家发送交互按钮,如不想重新发送,请使用负数*
|
||||||
3. 定义一个点击按钮时执行的函数,使用形如`execute if score @s fz.module.config.trigger matches <min>..<max> run ...`的指令判断玩家的触发器分数,并执行你的操作
|
- 大多数情况下这里的触发器分数必须是独一无二的
|
||||||
4. 如需在点击后重新显示一遍配置页面,请在上述函数中调用一次[`#fz:module/config/display`](data/fz/tags/functions/module/config/display.json)标签,**请不要将此标签直接注册到[`#fz:module/config/on_click`](data/fz/tags/functions/module/config/on_click.json)标签中**
|
- 建议使用`>10000`的随机数作为自定义按钮的触发器分数
|
||||||
5. 在[`#fz:module/config/on_click`](data/fz/tags/functions/module/config/on_click.json)标签中注册上述函数
|
2. 在[`#fzsd:module/interactor/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)标签中注册上述函数
|
||||||
|
|
||||||
#### 其他接口
|
#### 其他标签
|
||||||
- 标签[`#fz:module/config/timeout`](data/fz/tags/functions/module/config/timeout.json):超时时的操作
|
- 标签[`#fzsd:module/interactor/reset_trigger`](data/fzsd/tags/functions/module/interactor/reset_trigger.json):重置玩家`@s`的触发器计分板
|
||||||
- 标签[`#fz:module/config/reset_trigger`](data/fz/tags/functions/module/config/reset_trigger.json):重置玩家`@s`的触发器计分板
|
|
||||||
|
|
||||||
### 计分板模块
|
### 计分板模块
|
||||||
|
|
||||||
#### 自定义计分板颜色
|
#### 自定义计分板颜色
|
||||||
- 数据包提供了所有计分板的全部16色命名函数
|
- 数据包提供了所有计分板的全部16色命名函数
|
||||||
- 使用方法:**覆盖**[`#fz:module/scoreboard/display/set_text/<计分板名称>`](data/fz/tags/functions/module/scoreboard/display/set_text/)标签,填入[`fz:module/scoreboard/display/set_text/<计分板名称>/<颜色名称>`](data/fz/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. 定义一个设置计分板颜色、文本的函数,格式可以参考[`fz:module/scoreboard/display/set_text/general/*`](data/fz/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. **覆盖**[`#fz:module/scoreboard/display/set_text/<计分板名称>`](data/fz/tags/functions/module/scoreboard/display/set_text/)标签,填入上述函数
|
2. **覆盖**[`#fzsd:module/scoreboard/display/set_text/<计分板名称>`](data/fzsd/tags/functions/module/scoreboard/display/set_text/)标签,填入上述函数
|
||||||
|
|
||||||
#### 扩展自己的计分板
|
#### 扩展自己的计分板
|
||||||
1. 定义一个安装函数,参考[`fz:module/scoreboard/install`](data/fz/functions/module/scoreboard/install.mcfunction)函数
|
1. 定义一个安装函数,参考[`fzsd:module/scoreboard/install`](data/fzsd/functions/module/scoreboard/install.mcfunction)函数
|
||||||
2. 在[`#fz:module/scoreboard/install`](data/fz/tags/functions/module/scoreboard/install.json)标签中注册该函数
|
2. 在[`#fzsd:module/scoreboard/install`](data/fzsd/tags/functions/module/scoreboard/install.json)标签中注册该函数
|
||||||
3. 按照“自定义计分板颜色”和“自定义计分板名称”中的操作,定义你的计分板颜色和名称
|
3. 按照“自定义计分板颜色”和“自定义计分板名称”中的操作,定义你的计分板颜色和名称
|
||||||
4. 定义一个生成计分板运行时id的函数,参考[`fz:module/scoreboard/display/register_id`](data/fz/functions/module/scoreboard/display/register_id.mcfunction)函数
|
4. 定义一个生成计分板运行时id的函数,参考[`fzsd:module/scoreboard/display/register_id`](data/fzsd/functions/module/scoreboard/display/register_id.mcfunction)函数
|
||||||
5. 在[`#fz:module/scoreboard/display/register_id`](data/fz/tags/functions/module/scoreboard/display/register_id.json)标签中注册该函数
|
5. 在[`#fzsd:module/scoreboard/display/register_id`](data/fzsd/tags/functions/module/scoreboard/display/register_id.json)标签中注册该函数
|
||||||
6. 定义一个用来在轮播时显示你的计分板的函数,参考[`fz:module/scoreboard/display/carousel/set_display/*`](data/fz/functions/module/scoreboard/display/carousel/set_display/activation.mcfunction)函数
|
6. 定义一个用来在轮播时显示你的计分板的函数,参考[`fzsd:module/scoreboard/display/carousel/set_display/*`](data/fzsd/functions/module/scoreboard/display/carousel/set_display/activation.mcfunction)函数
|
||||||
7. 定义一个用来判断在轮播时是否轮到你的计分板的函数,在判断后调用上一条中的函数,参考[`fz:module/scoreboard/display/carousel/try_display/*`](data/fz/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. 将该函数注册到[`#fz:module/scoreboard/display/try_display`](data/fz/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>
|
||||||
|
|
||||||
#### 注册安装、卸载、加载函数
|
#### 注册安装、卸载、加载函数
|
||||||
- 在下列标签中注册你的安装、卸载、加载函数:
|
- 在下列标签中注册你的安装、卸载、加载函数:
|
||||||
- [`#fz:system/install/module`](data/fz/tags/functions/system/install/module.json)
|
- [`#fzsd:system/install/module`](data/fzsd/tags/functions/system/install/module.json)
|
||||||
- [`#fz:system/uninstall/module`](data/fz/tags/functions/system/uninstall/module.json)
|
- [`#fzsd:system/uninstall/module`](data/fzsd/tags/functions/system/uninstall/module.json)
|
||||||
- [`#fz:system/load/module`](data/fz/tags/functions/system/load/module.json)
|
- [`#fzsd:system/load/module`](data/fzsd/tags/functions/system/load/module.json)
|
||||||
|
|
||||||
#### 注册设置页面
|
#### 注册交互器按钮
|
||||||
- 见[按钮操作](#按钮操作)
|
- 见[交互器按钮](#按钮操作)
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2022 延皓
|
FZSD许可协议
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2022/11/19 https://gitee.com/harvey-husky/fz-survival-datapack/blob/dev/3.0/LICENSE
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
版权所有 © 2019-2022 延皓<https://gitee.com/harvey-husky><https://space.bilibili.com/677233356>
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
定义:
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
“该许可协议”指FZSD许可协议。
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
“该软件”指许可在该许可协议下的程序和相关文档的集合。
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
“官方网址”指由版权所有者提供的该软件的发布网址。
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
您对该软件的复制、使用、修改及分发受如下条款的约束:
|
||||||
SOFTWARE.
|
1. 禁止添加、修改或删除该许可协议的内容。
|
||||||
|
2. 禁止未经授权的转载、销售或二次发布该软件。
|
||||||
|
3. 禁止添加、修改或抹除该软件中的原作者署名。
|
||||||
|
4. 如果您从部署了该软件的Minecraft服务器中以任何方式获取了收益,则您必须在游戏中的明显位置明确告知用户您的Minecraft服务器使用了该软件,并附上该软件的官方网址。
|
||||||
|
5. 如果您修改了该软件中的任何内容,您必须将修改部分开源在主流开源平台(如gitee<https://gitee.com/>或github<https://github.com/>等)。
|
||||||
|
6. 如果您修改了该软件中的任何内容,您必须保留该许可协议,但您可以追加其他许可协议(不包括不支持附加条款的许可协议)。当您添加的许可协议中的条款与该许可协议冲突时,必须以该许可协议为准。
|
||||||
|
7. 该软件在提供时不带任何明示或默示的担保。在任何情况下,版权所有者不对任何人因使用该软件而引发的任何直接或间接损失承担任何责任。
|
||||||
@@ -1,9 +1,96 @@
|
|||||||
# FZ datapack 3.0 版
|
# FZ生存数据包
|
||||||
|
|
||||||
啊哈! 欢迎来到FZ数据包的3.0区域
|
为FZ服务器写的Minecraft生存辅助数据包
|
||||||
|
|
||||||
不过很抱歉,这里还在装修,得等一段时间,谢谢!
|
#### @Author: Harvey_Husky
|
||||||
|
|
||||||
目前已有的东西:
|
#### Copyright (C) 2019-2022 Harvey_Husky
|
||||||
|
|
||||||
- `scripts`
|
[Bilibili专栏](https://www.bilibili.com/read/cv4267319)(年久失修)
|
||||||
|
|
||||||
|
## 安装教程
|
||||||
|
|
||||||
|
1. 兼容性
|
||||||
|
- `数据包 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版本的数据包
|
||||||
|
3. 从zip文件的 `scripts` 目录中挑选你需要的 `.sc` 文件
|
||||||
|
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` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`)
|
||||||
|
|
||||||
|
|
||||||
|
# FZ生存数据包 3.0
|
||||||
|
|
||||||
|
[](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [](https://minecraft.net/)
|
||||||
|
|
||||||
|
> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
|
||||||
|
|
||||||
|
## 功能
|
||||||
|
|
||||||
|
### 交互器
|
||||||
|
|
||||||
|
- 抬头90°并蹲起,或执行 `/trigger fzsd.module.interactor.trigger` 指令唤出交互器
|
||||||
|
|
||||||
|
### 计分板
|
||||||
|
|
||||||
|
- 提供下列计分板:
|
||||||
|
|
||||||
|
| 默认名称 | 计分板ID |
|
||||||
|
| :------: | :----------------------------------------------: |
|
||||||
|
| 总榜 | fzsd.module.scoreboard.display.general |
|
||||||
|
| 活跃度 | fzsd.module.scoreboard.display.activation |
|
||||||
|
| 飞行距离 | fzsd.module.scoreboard.display.aviating_distance |
|
||||||
|
| 抖M榜 | fzsd.module.scoreboard.display.damage_taken |
|
||||||
|
| 死亡榜 | fzsd.module.scoreboard.display.death_count |
|
||||||
|
| 挖掘榜 | fzsd.module.scoreboard.display.dig_count |
|
||||||
|
| 钓鱼榜 | fzsd.module.scoreboard.display.fishing_count |
|
||||||
|
| 击杀榜 | fzsd.module.scoreboard.display.kill_count |
|
||||||
|
| 放置榜 | 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`(**开发中!此处列举目前已完成的**):
|
||||||
|
- 可避免Carpet假人污染计分板
|
||||||
|
- 可以标记哪些玩家是假人
|
||||||
|
- *注:请不要使用为假人名添加“bot”前缀的carpet扩展,本插件不支持此类假人!*
|
||||||
|
- 子命令( `/fzsd_score <子命令>` ):
|
||||||
|
- `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,35 @@
|
|||||||
|
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": "]"}]]]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function fzsd:system/carpet/settings_preset
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b
|
||||||
|
function #fzsd:module/health/try_load
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b
|
||||||
|
function #fzsd:module/health/try_load
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
data modify storage fzsd:config fzsd.module.health.display.list set value 0b
|
||||||
|
function #fzsd:module/health/try_load
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
data modify storage fzsd:config fzsd.module.health.display.list set value 1b
|
||||||
|
function #fzsd:module/health/try_load
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"replace": false,
|
|
||||||
"values": [
|
|
||||||
{
|
|
||||||
"id": "fz.admin:autocarpet",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"criteria": {
|
|
||||||
"on_entered_nether_portal": {
|
|
||||||
"trigger": "minecraft:changed_dimension",
|
|
||||||
"conditions": {
|
|
||||||
"player": {
|
|
||||||
"location": {
|
|
||||||
"block": {
|
|
||||||
"blocks": [
|
|
||||||
"minecraft:nether_portal"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_entered_nether_portal"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event",
|
|
||||||
"criteria": {
|
|
||||||
"on_fished": {
|
|
||||||
"trigger": "minecraft:fishing_rod_hooked",
|
|
||||||
"conditions": {
|
|
||||||
"item": {
|
|
||||||
"tag": "fz:raw_fishes"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_fished"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event",
|
|
||||||
"criteria": {
|
|
||||||
"on_hurt_entity_with_tools": {
|
|
||||||
"trigger": "minecraft:player_hurt_entity",
|
|
||||||
"conditions": {
|
|
||||||
"player": {
|
|
||||||
"equipment": {
|
|
||||||
"mainhand": {
|
|
||||||
"tag": "fz:tools"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_hurt_entity_with_tools"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event",
|
|
||||||
"criteria": {
|
|
||||||
"on_placed_block": {
|
|
||||||
"trigger": "minecraft:placed_block"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_placed_block"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event",
|
|
||||||
"criteria": {
|
|
||||||
"on_shears_used_on_entity": {
|
|
||||||
"trigger": "minecraft:player_interacted_with_entity",
|
|
||||||
"conditions": {
|
|
||||||
"entity": {
|
|
||||||
"type": "#fz:shearable"
|
|
||||||
},
|
|
||||||
"item": {
|
|
||||||
"tag": "fz:tool/shears"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_shears_used_on_entity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event",
|
|
||||||
"criteria": {
|
|
||||||
"on_sneak": {
|
|
||||||
"trigger": "minecraft:tick",
|
|
||||||
"conditions": {
|
|
||||||
"player": {
|
|
||||||
"flags": {
|
|
||||||
"is_sneaking": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_sneak"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event",
|
|
||||||
"criteria": {
|
|
||||||
"on_tools_used_on_block": {
|
|
||||||
"__comment": "斧子剥树皮会触发两次!",
|
|
||||||
"trigger": "minecraft:item_used_on_block",
|
|
||||||
"conditions": {
|
|
||||||
"item": {
|
|
||||||
"tag": "fz:tools"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_tools_used_on_block"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event/on_sneak",
|
|
||||||
"criteria": {
|
|
||||||
"on_unsneak": {
|
|
||||||
"trigger": "minecraft:tick",
|
|
||||||
"conditions": {
|
|
||||||
"player": {
|
|
||||||
"flags": {
|
|
||||||
"is_sneaking": false
|
|
||||||
},
|
|
||||||
"type_specific": {
|
|
||||||
"type": "player",
|
|
||||||
"advancements": {
|
|
||||||
"fz:game_event/on_sneak": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_unsneak"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "fz:game_event",
|
|
||||||
"criteria": {
|
|
||||||
"on_villager_trade": {
|
|
||||||
"trigger": "minecraft:villager_trade"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rewards": {
|
|
||||||
"function": "fz:game_event/player/on_villager_trade"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
data modify storage fz:global fz.api.dimension.name set value '{"nbt": "fz.cache.dimension.id", "storage": "fz:global"}'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
execute if data storage fz:global fz.api.dimension{id:'minecraft:overworld'} run data modify storage fz:global fz.api.dimension.name set value '{"text": "主世界", "color": "dark_green"}'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
execute if data storage fz:global fz.api.dimension{id:'minecraft:the_end'} run data modify storage fz:global fz.api.dimension.name set value '{"text": "末地", "color": "dark_gray"}'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
execute if data storage fz:global fz.api.dimension{id:'minecraft:the_nether'} run data modify storage fz:global fz.api.dimension.name set value '{"text": "下界", "color": "dark_red"}'
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
data modify storage fz:global fz.api.dimension.id set from entity @s Dimension
|
|
||||||
data remove storage fz:global fz.api.dimension.name
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
function #fz:uninstall
|
|
||||||
function #fz:install
|
|
||||||
function #fz:load
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# execute unless data storage fz:installed fz.global run function #fz:install
|
|
||||||
# execute if data storage fz:installed fz{global:1b} run function #fz:load
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
## 事件触发
|
|
||||||
scoreboard objectives add fz.event.aviating_distance minecraft.custom:aviate_one_cm
|
|
||||||
scoreboard objectives add fz.event.damage_taken minecraft.custom:damage_taken
|
|
||||||
scoreboard objectives add fz.event.death_count deathCount
|
|
||||||
scoreboard objectives add fz.event.leave_game minecraft.custom:leave_game
|
|
||||||
scoreboard objectives add fz.event.play_ticks minecraft.custom:play_time
|
|
||||||
scoreboard objectives add fz.event.villager_trade minecraft.custom:traded_with_villager
|
|
||||||
|
|
||||||
## 使用工具
|
|
||||||
scoreboard objectives add fz.event.used_tool.dig_offset dummy
|
|
||||||
scoreboard objectives add fz.event.used_tool.iron_axe minecraft.used:iron_axe
|
|
||||||
scoreboard objectives add fz.event.used_tool.stone_axe minecraft.used:stone_axe
|
|
||||||
scoreboard objectives add fz.event.used_tool.golden_axe minecraft.used:golden_axe
|
|
||||||
scoreboard objectives add fz.event.used_tool.wooden_axe minecraft.used:wooden_axe
|
|
||||||
scoreboard objectives add fz.event.used_tool.diamond_axe minecraft.used:diamond_axe
|
|
||||||
scoreboard objectives add fz.event.used_tool.netherite_axe minecraft.used:netherite_axe
|
|
||||||
scoreboard objectives add fz.event.used_tool.iron_hoe minecraft.used:iron_hoe
|
|
||||||
scoreboard objectives add fz.event.used_tool.stone_hoe minecraft.used:stone_hoe
|
|
||||||
scoreboard objectives add fz.event.used_tool.golden_hoe minecraft.used:golden_hoe
|
|
||||||
scoreboard objectives add fz.event.used_tool.wooden_hoe minecraft.used:wooden_hoe
|
|
||||||
scoreboard objectives add fz.event.used_tool.diamond_hoe minecraft.used:diamond_hoe
|
|
||||||
scoreboard objectives add fz.event.used_tool.netherite_hoe minecraft.used:netherite_hoe
|
|
||||||
scoreboard objectives add fz.event.used_tool.iron_pickaxe minecraft.used:iron_pickaxe
|
|
||||||
scoreboard objectives add fz.event.used_tool.stone_pickaxe minecraft.used:stone_pickaxe
|
|
||||||
scoreboard objectives add fz.event.used_tool.golden_pickaxe minecraft.used:golden_pickaxe
|
|
||||||
scoreboard objectives add fz.event.used_tool.wooden_pickaxe minecraft.used:wooden_pickaxe
|
|
||||||
scoreboard objectives add fz.event.used_tool.diamond_pickaxe minecraft.used:diamond_pickaxe
|
|
||||||
scoreboard objectives add fz.event.used_tool.netherite_pickaxe minecraft.used:netherite_pickaxe
|
|
||||||
scoreboard objectives add fz.event.used_tool.shears minecraft.used:shears
|
|
||||||
scoreboard objectives add fz.event.used_tool.iron_shovel minecraft.used:iron_shovel
|
|
||||||
scoreboard objectives add fz.event.used_tool.stone_shovel minecraft.used:stone_shovel
|
|
||||||
scoreboard objectives add fz.event.used_tool.golden_shovel minecraft.used:golden_shovel
|
|
||||||
scoreboard objectives add fz.event.used_tool.wooden_shovel minecraft.used:wooden_shovel
|
|
||||||
scoreboard objectives add fz.event.used_tool.diamond_shovel minecraft.used:diamond_shovel
|
|
||||||
scoreboard objectives add fz.event.used_tool.netherite_shovel minecraft.used:netherite_shovel
|
|
||||||
scoreboard objectives add fz.event.used_tool.iron_sword minecraft.used:iron_sword
|
|
||||||
scoreboard objectives add fz.event.used_tool.stone_sword minecraft.used:stone_sword
|
|
||||||
scoreboard objectives add fz.event.used_tool.golden_sword minecraft.used:golden_sword
|
|
||||||
scoreboard objectives add fz.event.used_tool.wooden_sword minecraft.used:wooden_sword
|
|
||||||
scoreboard objectives add fz.event.used_tool.diamond_sword minecraft.used:diamond_sword
|
|
||||||
scoreboard objectives add fz.event.used_tool.netherite_sword minecraft.used:netherite_sword
|
|
||||||
|
|
||||||
## 标记为已安装
|
|
||||||
data modify storage fz:installed fz.event set value 1b
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
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,4 +0,0 @@
|
|||||||
execute as @a run function #fz:game_event/reset_all
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已加载系统组件:游戏事件"}]
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 详细
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..300 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "飞行了1m"}]
|
|
||||||
|
|
||||||
## 将事件数据缓存,并重置事件计分板
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.aviating_distance
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer /= 200 fz.variable.integer
|
|
||||||
scoreboard players operation @s fz.event.aviating_distance %= 200 fz.variable.integer
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_aviate_one_meter
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_aviate_one_meter
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# 调用者:fz:game_event/player/on_used_tool
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "挖掘了方块"}]
|
|
||||||
|
|
||||||
## 收集挖掘数据
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.used_tool.diamond_axe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_hoe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_pickaxe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_shovel
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.diamond_sword
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_axe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_hoe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_pickaxe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_shovel
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.golden_sword
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_axe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_hoe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_pickaxe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_shovel
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.iron_sword
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_axe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_hoe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_pickaxe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_shovel
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.netherite_sword
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.shears
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_axe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_hoe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_pickaxe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_shovel
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.stone_sword
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_axe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_hoe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_pickaxe
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_shovel
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_sword
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_broke_block
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "死亡"}]
|
|
||||||
|
|
||||||
## 将事件数据缓存,并重置事件计分板
|
|
||||||
# scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.death_count
|
|
||||||
scoreboard players set @s fz.event.death_count 0
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_dead
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_dead
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "进入了下届传送门"}]
|
|
||||||
|
|
||||||
function #fz:game_event/player/on_entered_nether_portal
|
|
||||||
|
|
||||||
advancement revoke @s only fz:game_event/on_entered_nether_portal
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "钓鱼上钩"}]
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_fished
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_fished
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了挖掘工具攻击实体"}]
|
|
||||||
|
|
||||||
## 计算挖掘数据偏移量
|
|
||||||
scoreboard players remove @s fz.event.used_tool.dig_offset 1
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_hurt_entity_with_tools
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_hurt_entity_with_tools
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "击杀了生物"}]
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_killed_mob_or_player
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_killed_mob_or_player
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "登录游戏"}]
|
|
||||||
|
|
||||||
scoreboard players set @s fz.event.leave_game 0
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
### 会调用reset_events标签,故本函数内不需要再重置事件进度
|
|
||||||
function #fz:game_event/player/on_login
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "与猪灵交易"}]
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_piglin_trade
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_piglin_trade
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "放置了方块"}]
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_placed_block
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_placed_block
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "游玩了1h"}]
|
|
||||||
|
|
||||||
## 将事件数据缓存,并重置事件计分板
|
|
||||||
# scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.play_ticks
|
|
||||||
# scoreboard players operation fz.var.score fz.variable.integer /= 3600 fz.variable.integer
|
|
||||||
scoreboard players operation @s fz.event.play_ticks %= 72000 fz.variable.integer
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_play_one_hour
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_play_one_hour
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "对实体使用剪刀"}]
|
|
||||||
|
|
||||||
## 计算挖掘数据偏移量
|
|
||||||
scoreboard players remove @s fz.event.used_tool.dig_offset 1
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_shears_used_on_entity
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_shears_used_on_entity
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "蹲下"}]
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_sneak
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "受到了伤害"}]
|
|
||||||
|
|
||||||
## 将事件数据缓存,并重置事件计分板
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.damage_taken
|
|
||||||
scoreboard players operation fz.var.score fz.variable.integer /= 10 fz.variable.integer
|
|
||||||
scoreboard players operation @s fz.event.damage_taken %= 10 fz.variable.integer
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_took_damage
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_took_damage
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
## 斧子剥树皮会触发两次!!
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "在方块上使用了工具"}]
|
|
||||||
|
|
||||||
## 计算挖掘数据偏移量
|
|
||||||
scoreboard players remove @s fz.event.used_tool.dig_offset 1
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_tools_used_on_block
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_tools_used_on_block
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "从蹲下状态站起"}]
|
|
||||||
|
|
||||||
# 调用者:advancement/fz:unskeak
|
|
||||||
##### 当玩家蹲起后触发此事件
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_unsneak
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s until fz:game_event/on_unsneak
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 详细
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..300 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了工具"}]
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_used_tool
|
|
||||||
|
|
||||||
## 判断并触发挖掘事件
|
|
||||||
### 挖掘偏移量可以被fz:game_event/[on_tools_used_on_block, on_shears_used_on_entity, on_hurt_entity_with_tools]改变
|
|
||||||
### 用于忽略非挖掘事件造成的工具使用分数
|
|
||||||
execute unless score @s fz.event.used_tool.offset matches ..-1 run function fz:game_event/player/on_broke_block
|
|
||||||
|
|
||||||
## 重置事件计分板
|
|
||||||
function #fz:game_event/player/on_used_tool/reset_used_tool
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_used_tool
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
scoreboard players set @s fz.event.used_tool.offset 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.diamond_axe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.diamond_hoe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.diamond_pickaxe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.diamond_shovel 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.diamond_sword 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.golden_axe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.golden_hoe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.golden_pickaxe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.golden_shovel 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.golden_sword 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.iron_axe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.iron_hoe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.iron_pickaxe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.iron_shovel 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.iron_sword 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.netherite_axe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.netherite_hoe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.netherite_pickaxe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.netherite_shovel 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.netherite_sword 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.shears 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.stone_axe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.stone_hoe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.stone_pickaxe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.stone_shovel 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.stone_sword 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.wooden_axe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.wooden_hoe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.wooden_pickaxe 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.wooden_shovel 0
|
|
||||||
scoreboard players set @s fz.event.used_tool.wooden_sword 0
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "重置了玩家"}, {"selector": "@s"}, {"text": "的used_tool计分板"}]
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 调用者:advancements/fz:~
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "与村民交易"}]
|
|
||||||
|
|
||||||
## 运行事件
|
|
||||||
function #fz:game_event/player/on_villager_trade
|
|
||||||
|
|
||||||
## 重置事件进度
|
|
||||||
advancement revoke @s only fz:game_event/on_villager_trade
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
## 复位所有事件进度
|
|
||||||
### 所有事件进度都继承了fz:game_event进度,因此只需要一行指令:
|
|
||||||
advancement revoke @s from fz:game_event
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已重置玩家"}, {"selector": "@s"}, {"text": "的所有事件进度"}]
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
## 事件触发
|
|
||||||
scoreboard objectives remove fz.event.aviating_distance
|
|
||||||
scoreboard objectives remove fz.event.damage_taken
|
|
||||||
scoreboard objectives remove fz.event.death_count
|
|
||||||
scoreboard objectives remove fz.event.leave_game
|
|
||||||
scoreboard objectives remove fz.event.play_ticks
|
|
||||||
scoreboard objectives remove fz.event.villager_trade
|
|
||||||
|
|
||||||
## 使用工具
|
|
||||||
scoreboard objectives remove fz.event.used_tool.dig_offset
|
|
||||||
scoreboard objectives remove fz.event.used_tool.iron_axe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.stone_axe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.golden_axe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.wooden_axe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.diamond_axe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.netherite_axe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.iron_hoe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.stone_hoe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.golden_hoe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.wooden_hoe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.diamond_hoe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.netherite_hoe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.iron_pickaxe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.stone_pickaxe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.golden_pickaxe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.wooden_pickaxe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.diamond_pickaxe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.netherite_pickaxe
|
|
||||||
scoreboard objectives remove fz.event.used_tool.shears
|
|
||||||
scoreboard objectives remove fz.event.used_tool.iron_shovel
|
|
||||||
scoreboard objectives remove fz.event.used_tool.stone_shovel
|
|
||||||
scoreboard objectives remove fz.event.used_tool.golden_shovel
|
|
||||||
scoreboard objectives remove fz.event.used_tool.wooden_shovel
|
|
||||||
scoreboard objectives remove fz.event.used_tool.diamond_shovel
|
|
||||||
scoreboard objectives remove fz.event.used_tool.netherite_shovel
|
|
||||||
scoreboard objectives remove fz.event.used_tool.iron_sword
|
|
||||||
scoreboard objectives remove fz.event.used_tool.stone_sword
|
|
||||||
scoreboard objectives remove fz.event.used_tool.golden_sword
|
|
||||||
scoreboard objectives remove fz.event.used_tool.wooden_sword
|
|
||||||
scoreboard objectives remove fz.event.used_tool.diamond_sword
|
|
||||||
scoreboard objectives remove fz.event.used_tool.netherite_sword
|
|
||||||
|
|
||||||
## 删除安装标记
|
|
||||||
data remove storage fz:installed fz.event
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
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,6 +0,0 @@
|
|||||||
# 调用者:fz:logger/uninstall
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已删除日志配置!"}]
|
|
||||||
|
|
||||||
data remove storage fz:logger fz
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
##### 使用方式,形如:tellraw @a [{"nbt": "fz.exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
|
|
||||||
|
|
||||||
## 根
|
|
||||||
data modify storage fz:logger fz.root set value '[{"text": "", "color": "white"}, {"text": "[", "color": "dark_gray"}, {"text": "FZD", "color": "gold"}, {"text": "]", "color": "dark_gray"}]'
|
|
||||||
|
|
||||||
## 不同日志等级
|
|
||||||
### error 800
|
|
||||||
data modify storage fz:logger fz.level.error set value '[{"text": "", "color": "red"}, {"nbt": "root", "interpret": true, "storage": "fz:logger"}, {"text": "[错误]"}]'
|
|
||||||
### alert 600
|
|
||||||
data modify storage fz:logger fz.level.alert set value '[{"text": "", "color": "yellow"}, {"nbt": "fz.root", "interpret": true, "storage": "fz:logger"}, {"text": "[提醒]"}]'
|
|
||||||
### info 500
|
|
||||||
data modify storage fz:logger fz.level.info set value '[{"text": "", "color": "green"}, {"nbt": "fz.root", "interpret": true, "storage": "fz:logger"}, {"text": "[信息]"}]'
|
|
||||||
### debug 400
|
|
||||||
data modify storage fz:logger fz.level.debug set value '[{"text": "", "color": "dark_aqua"}, {"nbt": "fz.root", "interpret": true, "storage": "fz:logger"}, {"text": "[调试]"}]'
|
|
||||||
### fine 300
|
|
||||||
data modify storage fz:logger fz.level.fine set value '[{"text": "", "color": "gray"}, {"nbt": "fz.root", "interpret": true, "storage": "fz:logger"}, {"text": "[详细]"}]'
|
|
||||||
|
|
||||||
## 异常
|
|
||||||
data modify storage fz:logger fz.exception.load_without_install_exception set value '[{"nbt": "fz.level.error", "interpret": true, "storage": "fz:logger"}, {"text": "模块在未安装时被加载:"}]'
|
|
||||||
|
|
||||||
## 首次安装时日志等级默认为一般消息
|
|
||||||
execute unless data storage fz:logger fz.levels.current run data modify storage fz:logger fz.levels.current set value 500
|
|
||||||
|
|
||||||
## 读取日志等级存入缓存
|
|
||||||
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
|
||||||
|
|
||||||
## 标记为已安装
|
|
||||||
data modify storage fz:installed fz.logger set value 1b
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
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,7 +0,0 @@
|
|||||||
|
|
||||||
## debug 400
|
|
||||||
data modify storage fz:logger fz.levels.current set value 400
|
|
||||||
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "日志等级设为调试"}]
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
## fine 300
|
|
||||||
data modify storage fz:logger fz.levels.current set value 300
|
|
||||||
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "日志等级设为详细"}]
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
## info 500
|
|
||||||
data modify storage fz:logger fz.levels.current set value 500
|
|
||||||
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "日志等级设为一般信息"}]
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# 调用者:#fz:logger/init
|
|
||||||
|
|
||||||
## 读取日志等级存入缓存
|
|
||||||
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
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,10 +0,0 @@
|
|||||||
## 调用者:#fz:logger/uninstall
|
|
||||||
|
|
||||||
## 删除安装标记
|
|
||||||
data remove storage fz:installed fz.logger
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载系统组件:日志"}]
|
|
||||||
|
|
||||||
## 询问是否清除数据
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除日志配置吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:logger/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}]
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
scoreboard objectives add fz.module.health health
|
|
||||||
scoreboard objectives modify fz.module.health rendertype hearts
|
|
||||||
|
|
||||||
## 标记为已安装
|
|
||||||
data modify storage fz:installed fz.module.health set value 1b
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
execute unless data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fz.module.health
|
|
||||||
execute if data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName
|
|
||||||
execute unless data storage fz:config fz.module.health.display{list: 0b} run scoreboard objectives setdisplay list fz.module.health
|
|
||||||
execute if data storage fz:config fz.module.health.display{list: 0b} run scoreboard objectives setdisplay list
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
scoreboard objectives modify fz.module.health displayname {"text": "血量", "color": "red"}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
scoreboard objectives modify fz.module.health displayname {"text": "HP"}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
scoreboard objectives modify fz.module.health displayname {"text": "厘米", "color": "gold"}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
scoreboard objectives modify fz.module.health displayname {"text": "cm", "color": "gold"}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
scoreboard objectives modify fz.module.health displayname {"text": "节操值", "color": "green"}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
scoreboard objectives modify fz.module.health displayname {"text": "沙雕值", "color": "yellow"}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
scoreboard objectives remove fz.module.health
|
|
||||||
data remove storage fz:config fz.module.health
|
|
||||||
|
|
||||||
## 标记为已卸载
|
|
||||||
data modify storage fz:installed fz.module.health set value 0b
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
data modify storage fz:here fz.nether_pos set value [0, 0]
|
|
||||||
execute store result storage fz:here fz.nether.x int 0.125 run data get entity @s Pos[0]
|
|
||||||
execute store result storage fz:here fz.nether.z int 0.125 run data get entity @s Pos[2]
|
|
||||||
data modify storage fz:global fz.api.dimension.id set value "minecraft:the_nether"
|
|
||||||
function #fz:api/get_dimension_name
|
|
||||||
data modify storage fz:here fz.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.nether.x", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.nether.z", "storage": "fz:here"}, {"text": "]"}]]'
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
data modify storage fz:here fz.overworld_pos set value [0, 0]
|
|
||||||
execute store result storage fz:here fz.overworld.x int 8 run data get entity @s Pos[0]
|
|
||||||
execute store result storage fz:here fz.overworld.z int 8 run data get entity @s Pos[2]
|
|
||||||
data modify storage fz:global fz.api.dimension.id set value "minecraft:overworld"
|
|
||||||
function #fz:api/get_dimension_name
|
|
||||||
data modify storage fz:here fz.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.overworld.x", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.overworld.z", "storage": "fz:here"}, {"text": "]"}]]'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
execute if data storage fz:global fz.api.dimension{id:"minecraft:overworld"} run function fz:module/here/get_dimension_message/if_overworld
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
execute if data storage fz:global fz.api.dimension{id:"minecraft:the_nether"} run function fz:module/here/get_dimension_message/if_the_nether
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
## fz.cache.pos已在install中初始化
|
|
||||||
execute store result storage fz:here fz.x int 1 run data get entity @s Pos[0]
|
|
||||||
execute store result storage fz:here fz.y int 1 run data get entity @s Pos[1]
|
|
||||||
execute store result storage fz:here fz.z int 1 run data get entity @s Pos[2]
|
|
||||||
data modify storage fz:here fz.message.dimension set from storage fz:global fz.api.dimension.name
|
|
||||||
data modify storage fz:here fz.message.position set value '[{"text": "[", "color": "green"}, {"nbt": "fz.x", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.y", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.z", "storage": "fz:here"}, {"text": "]"}]'
|
|
||||||
data modify storage fz:here fz.message.append set value ''
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了位置信息"}]
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
tellraw @a [{"text": "", "color": "white"}, {"selector": "@s"}, {"text": "说:"}, {"text": "我在"}, {"nbt": "fz.message.dimension", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message.position", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message.append", "interpret": true, "storage": "fz:here"}]
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
## 标记为已安装
|
|
||||||
data modify storage fz:installed fz.module.here set value 1b
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
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 +0,0 @@
|
|||||||
execute if data storage fz:installed fz.module{last_nether_portal:1b} run tellraw @s [{"text": "获取位置:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 2000"}},{"text": "私信", "color": "aqua"},{"text": "]"}], [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:所有人"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 2010"}},{"text": "广播", "color": "aqua"},{"text": "]"}]]
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
execute if score @s fz.module.interactor.trigger matches 2000 run function #fz:module/here/private_message
|
|
||||||
execute if score @s fz.module.interactor.trigger matches 2010 run function #fz:module/here/global_message
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fz.message.dimension", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message.position", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message.append", "interpret": true, "storage": "fz:here"}]
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
data remove storage fz:here fz
|
|
||||||
|
|
||||||
## 标记为已卸载
|
|
||||||
data modify storage fz:installed fz.module.here set value 0b
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
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,3 +0,0 @@
|
|||||||
# 本目录用于存放向事件中注册的函数,并不用来新建事件
|
|
||||||
|
|
||||||
execute if entity @s[x_rotation = -90] run function #fz:module/interactor/on_interact
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
scoreboard objectives add fz.module.interactor.trigger trigger
|
|
||||||
|
|
||||||
## 标记为已安装
|
|
||||||
data modify storage fz:installed fz.module.interactor set value 1b
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
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,5 +0,0 @@
|
|||||||
schedule clear fz:module/interactor/loop
|
|
||||||
execute as @a run function #fz:module/interactor/reset_trigger
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
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,6 +0,0 @@
|
|||||||
# 调用者:fz:module/interactor/trigger
|
|
||||||
|
|
||||||
## 如果分数大于0说明玩家点击了按钮
|
|
||||||
execute as @a if score @s fz.module.interactor.trigger matches 1.. run function #fz:module/interactor/on_click/on_click
|
|
||||||
|
|
||||||
schedule function fz:module/interactor/loop 1t replace
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# 调用者:#fz:module/interactor/on_click
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "点击了配置按钮,触发器分数为:"}, {"score": {"name": "@s", "objective": "fz.module.interactor.trigger"}}]
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "触发了配置页面"}]
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
## 设置或重制超时时间
|
|
||||||
schedule function #fz:module/interactor/timeout 300s replace
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# 调用者:#fz:module/interactor/reset_trigger
|
|
||||||
|
|
||||||
scoreboard players reset @s fz.module.interactor.trigger
|
|
||||||
scoreboard players enable @s fz.module.interactor.trigger
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已重置玩家"}, {"selector": "@s"}, {"text": "的触发器分数"}]
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
schedule clear fz:module/interactor/loop
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "五分钟无人回应,已关闭配置按钮监听,再次使用时需重新唤起"}]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
schedule clear fz:module/interactor/loop
|
|
||||||
|
|
||||||
scoreboard objectives remove fz.module.interactor.trigger
|
|
||||||
|
|
||||||
## 标记为已卸载
|
|
||||||
data modify storage fz:installed fz.module.interactor set value 0b
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
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,7 +0,0 @@
|
|||||||
data modify storage fz:global fz.api.dimension.id set from entity @s LastDeathLocation.dimension
|
|
||||||
execute store result storage fz:last_death fz.x int 1 run data get entity @s LastDeathLocation.pos[0]
|
|
||||||
execute store result storage fz:last_death fz.y int 1 run data get entity @s LastDeathLocation.pos[1]
|
|
||||||
execute store result storage fz:last_death fz.z int 1 run data get entity @s LastDeathLocation.pos[2]
|
|
||||||
|
|
||||||
## 调试
|
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了死亡点"}]
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
## 标记为已安装
|
|
||||||
data modify storage fz:installed fz.module.last_death set value 1b
|
|
||||||
|
|
||||||
## 日志
|
|
||||||
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 +0,0 @@
|
|||||||
execute if data storage fz:installed fz.module{last_death:1b} run tellraw @s [{"text": "获取上一死亡点:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 2100"}},{"text": "私信", "color": "aqua"},{"text": "]"}]]
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
execute if score @s fz.module.interactor.trigger matches 2100 run function #fz:module/last_death/private_message
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user