From 52f182a02f9f1d81869cbf61e2a251f64422e893 Mon Sep 17 00:00:00 2001 From: Harvey_Husky Date: Sat, 9 Dec 2023 09:19:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=811.20-1.20.4=EF=BC=9B=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=A1=80=E9=87=8F=E6=98=BE=E7=A4=BA=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 ++-- README.md | 2 +- .../fzsd/functions/module/health/load.mcfunction | 7 +++++++ .../module/health/below_name/off.mcfunction | 2 +- .../module/health/below_name/on.mcfunction | 2 +- .../functions/module/health/list/off.mcfunction | 2 +- .../functions/module/health/list/on.mcfunction | 2 +- data/fzsd/functions/boot.mcfunction | 2 +- data/fzsd/functions/module/health/load.mcfunction | 1 + .../{post_loop.mcfunction => pre_loop.mcfunction} | 0 .../tags/functions/module/sweeper/start_loop.json | 2 +- pack.mcmeta | 13 ++++++++++++- 12 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 compat_16/data/fzsd/functions/module/health/load.mcfunction rename data/fzsd/functions/module/sweeper/{post_loop.mcfunction => pre_loop.mcfunction} (100%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6b6ceb0..2011ae1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,6 +17,6 @@ "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", - "datapack.env.dataVersion": "1.20" + "datapack.env.cmdVersion": "1.20.2", + "datapack.env.dataVersion": "1.20.4" } \ No newline at end of file diff --git a/README.md b/README.md index 6e4d74f..85ecbb2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ # FZ生存数据包 3.1 -[![数据包版本](https://img.shields.io/badge/正式版-3.1.4-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [![MC版本](https://img.shields.io/badge/Minecraft-1.20+-blue.svg)](https://minecraft.net/) +[![数据包版本](https://img.shields.io/badge/正式版-3.1.6-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) diff --git a/compat_16/data/fzsd/functions/module/health/load.mcfunction b/compat_16/data/fzsd/functions/module/health/load.mcfunction new file mode 100644 index 0000000..4fe879f --- /dev/null +++ b/compat_16/data/fzsd/functions/module/health/load.mcfunction @@ -0,0 +1,7 @@ +execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name fzsd.module.health +execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name +execute unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health +execute if data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list + +## 日志 +execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已加载组件:玩家血量显示"}] \ No newline at end of file diff --git a/data/admin.fzsd/functions/module/health/below_name/off.mcfunction b/data/admin.fzsd/functions/module/health/below_name/off.mcfunction index 3ab94fd..528afe8 100644 --- a/data/admin.fzsd/functions/module/health/below_name/off.mcfunction +++ b/data/admin.fzsd/functions/module/health/below_name/off.mcfunction @@ -1,2 +1,2 @@ data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b -function #fzsd:module/health/try_load \ No newline at end of file +function fzsd:module/health/try_load \ No newline at end of file diff --git a/data/admin.fzsd/functions/module/health/below_name/on.mcfunction b/data/admin.fzsd/functions/module/health/below_name/on.mcfunction index d46860b..89ee0c8 100644 --- a/data/admin.fzsd/functions/module/health/below_name/on.mcfunction +++ b/data/admin.fzsd/functions/module/health/below_name/on.mcfunction @@ -1,2 +1,2 @@ data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b -function #fzsd:module/health/try_load \ No newline at end of file +function fzsd:module/health/try_load \ No newline at end of file diff --git a/data/admin.fzsd/functions/module/health/list/off.mcfunction b/data/admin.fzsd/functions/module/health/list/off.mcfunction index 602d8ab..d95e580 100644 --- a/data/admin.fzsd/functions/module/health/list/off.mcfunction +++ b/data/admin.fzsd/functions/module/health/list/off.mcfunction @@ -1,2 +1,2 @@ data modify storage fzsd:config fzsd.module.health.display.list set value 0b -function #fzsd:module/health/try_load \ No newline at end of file +function fzsd:module/health/try_load \ No newline at end of file diff --git a/data/admin.fzsd/functions/module/health/list/on.mcfunction b/data/admin.fzsd/functions/module/health/list/on.mcfunction index 5970a98..304063a 100644 --- a/data/admin.fzsd/functions/module/health/list/on.mcfunction +++ b/data/admin.fzsd/functions/module/health/list/on.mcfunction @@ -1,2 +1,2 @@ data modify storage fzsd:config fzsd.module.health.display.list set value 1b -function #fzsd:module/health/try_load \ No newline at end of file +function fzsd:module/health/try_load \ No newline at end of file diff --git a/data/fzsd/functions/boot.mcfunction b/data/fzsd/functions/boot.mcfunction index fb77308..7e9942c 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.4'}} +execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.6'}} 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/module/health/load.mcfunction b/data/fzsd/functions/module/health/load.mcfunction index bbd6e7c..3d07874 100644 --- a/data/fzsd/functions/module/health/load.mcfunction +++ b/data/fzsd/functions/module/health/load.mcfunction @@ -1,3 +1,4 @@ +## @see compat_16 execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fzsd.module.health execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName execute unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health diff --git a/data/fzsd/functions/module/sweeper/post_loop.mcfunction b/data/fzsd/functions/module/sweeper/pre_loop.mcfunction similarity index 100% rename from data/fzsd/functions/module/sweeper/post_loop.mcfunction rename to data/fzsd/functions/module/sweeper/pre_loop.mcfunction diff --git a/data/fzsd/tags/functions/module/sweeper/start_loop.json b/data/fzsd/tags/functions/module/sweeper/start_loop.json index 2ce888d..1365fc5 100644 --- a/data/fzsd/tags/functions/module/sweeper/start_loop.json +++ b/data/fzsd/tags/functions/module/sweeper/start_loop.json @@ -2,7 +2,7 @@ "replace": false, "values": [ "fzsd:module/sweeper/clear", - "fzsd:module/sweeper/post_loop", + "fzsd:module/sweeper/pre_loop", "fzsd:module/sweeper/start_timer", "fzsd:module/sweeper/bossbar" ] diff --git a/pack.mcmeta b/pack.mcmeta index b98f0ee..894f121 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -4,7 +4,18 @@ "pack_format": 15, "supported_formats": { "min_inclusive": 15, - "max_inclusive": 18 + "max_inclusive": 26 } + }, + "overlays": { + "entries": [ + { + "formats": { + "min_inclusive": 16, + "max_inclusive": 26 + }, + "directory": "compat_16" + } + ] } } \ No newline at end of file