From d6124efa12d5fb7e7ddaa4aec026bc81c6251eb8 Mon Sep 17 00:00:00 2001 From: Harvey_Husky Date: Sun, 12 May 2024 22:03:28 +0800 Subject: [PATCH] 1.20.6 --- .vscode/settings.json | 25 +++++++- DEVDOC.md | 62 ++++++++++++------- README.md | 22 ++++--- .../advancements/game_event/on_fished.json | 22 +++++++ .../game_event/on_hurt_entity_with_tools.json | 30 +++++++++ .../on_placed_block/on_placed_liquid.json | 15 ++--- .../on_placed_block/on_placed_solid.json | 31 ++++++++++ .../game_event/on_shears_used_on_entity.json | 25 ++++++++ .../game_event/on_tools_used_on_block.json | 50 +++++++++++++++ .../display/set_text/light_purple.mcfunction | 6 +- .../on_tool_axes_used_on_block.json | 34 ---------- .../game_event/on_tools_used_on_block.json | 50 +++++++++++++++ data/fzsd/functions/boot.mcfunction | 2 +- .../advancement/on_placed_block.mcfunction | 3 + .../on_tools_used_on_block.mcfunction | 3 +- .../scoreboard/display/register_id.mcfunction | 2 +- .../predicates/axe_in_hand_effective.json | 48 -------------- .../display/set_text/placement_count.json | 2 +- .../display/set_text/trade_count.json | 2 +- pack.mcmeta | 11 +++- 20 files changed, 310 insertions(+), 135 deletions(-) create mode 100644 compat_27/data/fzsd/advancements/game_event/on_fished.json create mode 100644 compat_27/data/fzsd/advancements/game_event/on_hurt_entity_with_tools.json rename data/fzsd/advancements/game_event/on_tools_exclude_axes_used_on_block.json => compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_liquid.json (51%) create mode 100644 compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_solid.json create mode 100644 compat_27/data/fzsd/advancements/game_event/on_shears_used_on_entity.json create mode 100644 compat_27/data/fzsd/advancements/game_event/on_tools_used_on_block.json delete mode 100644 data/fzsd/advancements/game_event/on_tool_axes_used_on_block.json create mode 100644 data/fzsd/advancements/game_event/on_tools_used_on_block.json delete mode 100644 data/fzsd/predicates/axe_in_hand_effective.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 2011ae1..4868bd6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,6 +17,25 @@ "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}" }, - "datapack.env.cmdVersion": "1.20.2", - "datapack.env.dataVersion": "1.20.4" -} \ No newline at end of file + "datapack.env.exclude": [ + "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" +} diff --git a/DEVDOC.md b/DEVDOC.md index 780ca3c..2535e31 100644 --- a/DEVDOC.md +++ b/DEVDOC.md @@ -1,73 +1,85 @@ # 开发文档 - ## 指引 + - `函数`,指数据包`<命名空间>/functions`目录下的`.mcfunction`文件 - `标签`,指数据包`<命名空间>/tags`目录下的`.json`文件 - - `覆盖标签并填入函数`时,`replace`为`true` - ``` json - { - "replace": true, - "values": ... - } - ``` - - `向标签中注册函数`时,`replace`为`false` - ``` json - { - "replace": false, - "values": ... - } - ``` + - `覆盖标签并填入函数`时,`replace`为`true` + + ``` json + { + "replace": true, + "values": ... + } + ``` + + - `向标签中注册函数`时,`replace`为`false` + + ``` json + { + "replace": false, + "values": ... + } + ``` + - ***函数和标签是否能被扩展数据包成功覆盖,取决于数据包加载顺序***,请使用`/datapack enable after `指令,使您的扩展数据包在FZ's Survival Datapack之后加载 - ## 基本要求 + - 函数由两个以上的函数调用,或由不同包下的函数调用,或需要作为接口开放给下游数据包时,应改用标签调用! - 函数调用尽量不要使用`function`命令,应改在标签中按顺序调用! - ## 系统模块 ### 频繁使用的计算单元 + - [`#fzsd:calculation/*`](data/fzsd/tags/functions/calculation/)标签通常被用来进行简单重复的计算任务 ### 事件模块 + - 通常由**进度**触发,触发后调用同名的事件标签 - 在[`#fzsd:game_event/(<...>/)on_<事件>`](data/fzsd/tags/functions/game_event/)标签中注册触发时需要调用的函数即可 ### 日志模块 + - 仓库中提供了日志相关的代码片段,位于[`.vscode/settings.json`](.vscode/settings.json) - 暂时没有找到方法在服务端控制台打印日志,但会被记录在客户端 #### 详细 Fine + - 等级: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": "你的日志"}` #### 调试 Debug + - 等级: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": "你的日志"}` #### 信息 Info + - 等级: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": "你的日志"}` #### 提醒 Alert + - 等级: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": "你的日志"}` #### 意外 Exception + - 暂不提供 #### 错误 Error + - 等级: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": "你的日志"}` - ## 功能模块 ### 交互器模块 #### 按钮操作 + 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)标签中注册上述函数 #### 其他标签 + - 标签[`#fzsd:module/interactor/reset_trigger`](data/fzsd/tags/functions/module/interactor/reset_trigger.json):重置玩家`@s`的触发器计分板 ### 计分板模块 #### 自定义计分板颜色 + - 数据包提供了所有计分板的全部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/)函数 #### 自定义计分板名称 + 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/)标签,填入上述函数 #### 扩展自己的计分板 + 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)标签中注册该函数 3. 按照“自定义计分板颜色”和“自定义计分板名称”中的操作,定义你的计分板颜色和名称 @@ -99,18 +115,20 @@ 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)标签中 - ## 自定义模块 ### 排除假人 + - 如果您不想对假人执行您的命令,请将以下语句添加在您要执行的命令之前:
execute if predicate fzsd:is_real_player
#### 注册安装、卸载、加载函数 + - 在下列标签中注册你的安装、卸载、加载函数: - - [`#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/load/module`](data/fzsd/tags/functions/system/load/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/load/module`](data/fzsd/tags/functions/system/load/module.json) #### 注册交互器按钮 + - 见[交互器按钮](#按钮操作) diff --git a/README.md b/README.md index 6591998..3a1ced5 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,23 @@ -# FZ生存数据包 +# FZ生存数据包 v3.1 为FZ服务器写的Minecraft生存辅助数据包 +[![数据包版本](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/) + +> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases) + ## 安装教程 1. 兼容性 - `数据包 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` (不再维护) 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](https://github.com/gnembon/fabric-carpet/releases) 5. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` ) - **注意:如果未正确安装该脚本,数据包会强制禁用 carpet mod 的 `player` 命令以避免假人污染记分板,需要在安装好脚本后手动启用 `player` 命令** 6. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`) -# FZ生存数据包 3.1 - -[![数据包版本](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/) - -> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases) - ## 功能 ### 交互器 @@ -77,6 +75,9 @@ - 可避免Carpet假人污染计分板 - 可以标记哪些玩家是假人 - 子命令( `/fzsd_score <子命令>` ): + - ***使用前请务必备份存档!请报告不符预期的结果*** + - ***使用前请务必备份存档!请报告不符预期的结果*** + - ***使用前请务必备份存档!请报告不符预期的结果*** - `updateFrom `:用于从给定的数据包版本恢复计分板数据(需要测试!) - `recalculate`:重新计算所有计分板总分 - `recalculate `:重新计算该计分板总分 @@ -91,7 +92,8 @@ - `commandPlayer `:设置player命令权限类型 ### 幻翼预警 - - 首次使用需要先睡一觉 + +- 首次使用需要先睡一觉 ### 管理员 diff --git a/compat_27/data/fzsd/advancements/game_event/on_fished.json b/compat_27/data/fzsd/advancements/game_event/on_fished.json new file mode 100644 index 0000000..9007dbf --- /dev/null +++ b/compat_27/data/fzsd/advancements/game_event/on_fished.json @@ -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" + } +} \ No newline at end of file diff --git a/compat_27/data/fzsd/advancements/game_event/on_hurt_entity_with_tools.json b/compat_27/data/fzsd/advancements/game_event/on_hurt_entity_with_tools.json new file mode 100644 index 0000000..4b6e8d4 --- /dev/null +++ b/compat_27/data/fzsd/advancements/game_event/on_hurt_entity_with_tools.json @@ -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" + } +} \ No newline at end of file diff --git a/data/fzsd/advancements/game_event/on_tools_exclude_axes_used_on_block.json b/compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_liquid.json similarity index 51% rename from data/fzsd/advancements/game_event/on_tools_exclude_axes_used_on_block.json rename to compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_liquid.json index db38b48..0bf11d9 100644 --- a/data/fzsd/advancements/game_event/on_tools_exclude_axes_used_on_block.json +++ b/compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_liquid.json @@ -1,9 +1,8 @@ { - "parent": "fzsd:game_event", + "parent": "fzsd:game_event/on_placed_block", "criteria": { - "on_tools_exclude_axes_used_on_block": { - "__comment": "斧子剥树皮会触发两次!", - "trigger": "minecraft:item_used_on_block", + "on_placed_liquid": { + "trigger": "minecraft:placed_block", "conditions": { "location": [ { @@ -11,9 +10,11 @@ "name": "fzsd:is_real_player" }, { - "condition": "minecraft:match_tool", + "condition": "minecraft:location_check", "predicate": { - "tag": "fzsd:tools_exclude_axes" + "block": { + "blocks": "#fzsd:liquid" + } } } ] @@ -21,6 +22,6 @@ } }, "rewards": { - "function": "fzsd:game_event/advancement/on_tools_used_on_block" + "function": "fzsd:game_event/advancement/on_placed_block/on_placed_liquid" } } \ No newline at end of file diff --git a/compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_solid.json b/compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_solid.json new file mode 100644 index 0000000..f44a433 --- /dev/null +++ b/compat_27/data/fzsd/advancements/game_event/on_placed_block/on_placed_solid.json @@ -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" + } +} \ No newline at end of file diff --git a/compat_27/data/fzsd/advancements/game_event/on_shears_used_on_entity.json b/compat_27/data/fzsd/advancements/game_event/on_shears_used_on_entity.json new file mode 100644 index 0000000..3c74dc2 --- /dev/null +++ b/compat_27/data/fzsd/advancements/game_event/on_shears_used_on_entity.json @@ -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" + } +} \ No newline at end of file diff --git a/compat_27/data/fzsd/advancements/game_event/on_tools_used_on_block.json b/compat_27/data/fzsd/advancements/game_event/on_tools_used_on_block.json new file mode 100644 index 0000000..fbfe4b2 --- /dev/null +++ b/compat_27/data/fzsd/advancements/game_event/on_tools_used_on_block.json @@ -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" + } +} \ No newline at end of file diff --git a/data/fzsd.extra.bbl/functions/display/set_text/light_purple.mcfunction b/data/fzsd.extra.bbl/functions/display/set_text/light_purple.mcfunction index 2a96a54..ea7fb45 100644 --- a/data/fzsd.extra.bbl/functions/display/set_text/light_purple.mcfunction +++ b/data/fzsd.extra.bbl/functions/display/set_text/light_purple.mcfunction @@ -1,7 +1,7 @@ # 见#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 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 displayName {"text": "破基岩榜", "color": "purple"} +team modify fzsd.module.scoreboard.display.bedrock_broken_count displayName {"text": "破基岩榜", "color": "light_purple"} diff --git a/data/fzsd/advancements/game_event/on_tool_axes_used_on_block.json b/data/fzsd/advancements/game_event/on_tool_axes_used_on_block.json deleted file mode 100644 index bd0ad64..0000000 --- a/data/fzsd/advancements/game_event/on_tool_axes_used_on_block.json +++ /dev/null @@ -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" - } -} \ No newline at end of file diff --git a/data/fzsd/advancements/game_event/on_tools_used_on_block.json b/data/fzsd/advancements/game_event/on_tools_used_on_block.json new file mode 100644 index 0000000..98c014f --- /dev/null +++ b/data/fzsd/advancements/game_event/on_tools_used_on_block.json @@ -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" + } +} \ No newline at end of file diff --git a/data/fzsd/functions/boot.mcfunction b/data/fzsd/functions/boot.mcfunction index b24d79b..9e5d5ce 100644 --- a/data/fzsd/functions/boot.mcfunction +++ b/data/fzsd/functions/boot.mcfunction @@ -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.7'}} +execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.8-beta.1'}} execute if data storage fzsd:version fzsd{need_update: 1b} run function fzsd:system/update function fzsd:system/carpet/try_load_fzsd_score function #fzsd:load diff --git a/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction b/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction index c9e2aa5..84890f2 100644 --- a/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction +++ b/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction @@ -1,5 +1,8 @@ # 调用者: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 ## 重置事件进度 diff --git a/data/fzsd/functions/game_event/advancement/on_tools_used_on_block.mcfunction b/data/fzsd/functions/game_event/advancement/on_tools_used_on_block.mcfunction index b118083..5be2424 100644 --- a/data/fzsd/functions/game_event/advancement/on_tools_used_on_block.mcfunction +++ b/data/fzsd/functions/game_event/advancement/on_tools_used_on_block.mcfunction @@ -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 ## 重置事件进度 -advancement revoke @s from fzsd:game_event/on_tool_axes_used_on_block -advancement revoke @s from fzsd:game_event/on_tools_exclude_axes_used_on_block \ No newline at end of file +advancement revoke @s from fzsd:game_event/on_tools_used_on_block \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction b/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction index 51acc61..0362932 100644 --- a/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction @@ -56,4 +56,4 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.placement_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.placement_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.placement_count", "objective": "fzsd.variable.integer"}}] \ No newline at end of file +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.placement_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.placement_count", "objective": "fzsd.variable.integer"}}] diff --git a/data/fzsd/predicates/axe_in_hand_effective.json b/data/fzsd/predicates/axe_in_hand_effective.json deleted file mode 100644 index 0620111..0000000 --- a/data/fzsd/predicates/axe_in_hand_effective.json +++ /dev/null @@ -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" - } - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/data/fzsd/tags/functions/module/scoreboard/display/set_text/placement_count.json b/data/fzsd/tags/functions/module/scoreboard/display/set_text/placement_count.json index 0158e45..3f55146 100644 --- a/data/fzsd/tags/functions/module/scoreboard/display/set_text/placement_count.json +++ b/data/fzsd/tags/functions/module/scoreboard/display/set_text/placement_count.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "fzsd:module/scoreboard/display/set_text/placement_count/dark_green" + "fzsd:module/scoreboard/display/set_text/placement_count/dark_blue" ] } \ No newline at end of file diff --git a/data/fzsd/tags/functions/module/scoreboard/display/set_text/trade_count.json b/data/fzsd/tags/functions/module/scoreboard/display/set_text/trade_count.json index b6f7cb7..54d1f97 100644 --- a/data/fzsd/tags/functions/module/scoreboard/display/set_text/trade_count.json +++ b/data/fzsd/tags/functions/module/scoreboard/display/set_text/trade_count.json @@ -8,6 +8,6 @@ "replace": false, "__comment_values": "此处只能填写一个函数!", "values": [ - "fzsd:module/scoreboard/display/set_text/trade_count/green" + "fzsd:module/scoreboard/display/set_text/trade_count/dark_green" ] } \ No newline at end of file diff --git a/pack.mcmeta b/pack.mcmeta index 894f121..8b2771a 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -4,7 +4,7 @@ "pack_format": 15, "supported_formats": { "min_inclusive": 15, - "max_inclusive": 26 + "max_inclusive": 41 } }, "overlays": { @@ -15,7 +15,14 @@ "max_inclusive": 26 }, "directory": "compat_16" + }, + { + "formats": { + "min_inclusive": 27, + "max_inclusive": 41 + }, + "directory": "compat_27" } ] } -} \ No newline at end of file +}