From 1defc59eb594c85c9242bb02caf311553ff77a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=B6=E7=9A=93?= <1214946206@qq.com> Date: Sun, 31 Jul 2022 10:17:11 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../advancements/module/interactor/on_click.json | 2 +- data/fzsd/functions/boot.mcfunction | 2 +- data/fzsd/functions/entry.mcfunction | 2 +- .../fzsd/functions/game_event/install.mcfunction | 3 --- .../functions/game_event/uninstall.mcfunction | 3 --- data/fzsd/functions/logger/install.mcfunction | 3 --- data/fzsd/functions/logger/uninstall.mcfunction | 3 --- .../functions/module/health/install.mcfunction | 2 +- .../functions/module/health/uninstall.mcfunction | 2 +- .../functions/module/here/install.mcfunction | 2 +- .../module/here/interactor/display.mcfunction | 2 +- .../functions/module/here/uninstall.mcfunction | 2 +- .../event/advamcement/on_click.mcfunction | 5 +++++ .../module/interactor/event/on_click.mcfunction | 5 +---- .../event/on_unsneak/on_unsneak.mcfunction | 2 +- .../module/interactor/install.mcfunction | 2 +- .../module/interactor/uninstall.mcfunction | 2 +- .../module/join_message/install.mcfunction | 2 +- .../module/join_message/uninstall.mcfunction | 2 +- .../module/last_death/install.mcfunction | 2 +- .../last_death/interactor/display.mcfunction | 2 +- .../module/last_death/uninstall.mcfunction | 2 +- .../module/last_nether_portal/install.mcfunction | 2 +- .../interactor/display.mcfunction | 2 +- .../last_nether_portal/uninstall.mcfunction | 2 +- .../module/last_spawn_point/install.mcfunction | 2 +- .../interactor/display.mcfunction | 2 +- .../module/last_spawn_point/uninstall.mcfunction | 2 +- .../module/scoreboard/install.mcfunction | 2 +- .../scoreboard/interactor/display.mcfunction | 4 ++-- .../module/scoreboard/uninstall.mcfunction | 2 +- .../fzsd/functions/module/try_install.mcfunction | 16 ++++++++-------- data/fzsd/functions/module/try_load.mcfunction | 6 +++--- .../functions/system/install/after.mcfunction | 2 +- .../{uninstalled.mcfunction => after.mcfunction} | 2 +- .../tags/functions/system/uninstall/after.json | 2 +- 36 files changed, 46 insertions(+), 56 deletions(-) create mode 100644 data/fzsd/functions/module/interactor/event/advamcement/on_click.mcfunction rename data/fzsd/functions/system/uninstall/{uninstalled.mcfunction => after.mcfunction} (78%) diff --git a/data/fzsd/advancements/module/interactor/on_click.json b/data/fzsd/advancements/module/interactor/on_click.json index e038816..a6a43f3 100644 --- a/data/fzsd/advancements/module/interactor/on_click.json +++ b/data/fzsd/advancements/module/interactor/on_click.json @@ -37,6 +37,6 @@ } }, "rewards": { - "function": "fzsd:module/interactor/event/on_click" + "function": "fzsd:module/interactor/event/advamcement/on_click" } } \ No newline at end of file diff --git a/data/fzsd/functions/boot.mcfunction b/data/fzsd/functions/boot.mcfunction index 0fa82a1..710ffc2 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 int 1 run data merge storage fzsd:version {fzsd:{version: '3.0.0-beta.5'}} +execute store success storage fzsd:version fzsd.need_update int 1 run data merge storage fzsd:version {fzsd:{version: '3.0.0-beta.6'}} execute if data storage fzsd:version fzsd{need_update: 1} run function fzsd:system/update function fzsd:system/carpet/try_load_fzsd_score function #fzsd:load diff --git a/data/fzsd/functions/entry.mcfunction b/data/fzsd/functions/entry.mcfunction index 5c98ccd..0db68e8 100644 --- a/data/fzsd/functions/entry.mcfunction +++ b/data/fzsd/functions/entry.mcfunction @@ -1 +1 @@ -execute unless data storage fzsd:installed fzsd{global: 0b} run function fzsd:boot \ No newline at end of file +execute unless data storage fzsd:install fzsd{global: 0b} run function fzsd:boot \ No newline at end of file diff --git a/data/fzsd/functions/game_event/install.mcfunction b/data/fzsd/functions/game_event/install.mcfunction index 79d6d49..ae22326 100644 --- a/data/fzsd/functions/game_event/install.mcfunction +++ b/data/fzsd/functions/game_event/install.mcfunction @@ -41,8 +41,5 @@ scoreboard objectives add fzsd.event.used_tool.wooden_sword minecraft.used:woode scoreboard objectives add fzsd.event.used_tool.diamond_sword minecraft.used:diamond_sword scoreboard objectives add fzsd.event.used_tool.netherite_sword minecraft.used:netherite_sword -## 标记为已安装 -data modify storage fzsd:installed fzsd.event set value 1b - ## 调试 execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装系统组件:游戏事件"}] \ No newline at end of file diff --git a/data/fzsd/functions/game_event/uninstall.mcfunction b/data/fzsd/functions/game_event/uninstall.mcfunction index 62d8c02..dffc5a4 100644 --- a/data/fzsd/functions/game_event/uninstall.mcfunction +++ b/data/fzsd/functions/game_event/uninstall.mcfunction @@ -42,8 +42,5 @@ scoreboard objectives remove fzsd.event.used_tool.netherite_sword schedule clear fzsd:game_event/on_tick -## 删除安装标记 -data remove storage fzsd:installed fzsd.event - ## 调试 execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载系统组件:游戏事件"}] \ No newline at end of file diff --git a/data/fzsd/functions/logger/install.mcfunction b/data/fzsd/functions/logger/install.mcfunction index a40fe51..4b42440 100644 --- a/data/fzsd/functions/logger/install.mcfunction +++ b/data/fzsd/functions/logger/install.mcfunction @@ -24,8 +24,5 @@ execute unless data storage fzsd:logger fzsd.levels.current run data modify stor ## 读取日志等级存入缓存 execute store result score fzsd.logger.level fzsd.variable.integer run data get storage fzsd:logger fzsd.levels.current -## 标记为已安装 -data modify storage fzsd:installed fzsd.logger set value 1b - ## 调试 execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装系统组件:日志"}] \ No newline at end of file diff --git a/data/fzsd/functions/logger/uninstall.mcfunction b/data/fzsd/functions/logger/uninstall.mcfunction index 58a361a..dc037fc 100644 --- a/data/fzsd/functions/logger/uninstall.mcfunction +++ b/data/fzsd/functions/logger/uninstall.mcfunction @@ -1,8 +1,5 @@ ## 调用者:#fzsd:logger/uninstall -## 删除安装标记 -data remove storage fzsd:installed fzsd.logger - ## 调试 execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载系统组件:日志"}] diff --git a/data/fzsd/functions/module/health/install.mcfunction b/data/fzsd/functions/module/health/install.mcfunction index fc9e82f..593b83e 100644 --- a/data/fzsd/functions/module/health/install.mcfunction +++ b/data/fzsd/functions/module/health/install.mcfunction @@ -2,7 +2,7 @@ scoreboard objectives add fzsd.module.health health scoreboard objectives modify fzsd.module.health rendertype hearts ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.health set value 1b +data modify storage fzsd:install fzsd.module.health set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:血量显示"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/health/uninstall.mcfunction b/data/fzsd/functions/module/health/uninstall.mcfunction index 272a9bf..914630f 100644 --- a/data/fzsd/functions/module/health/uninstall.mcfunction +++ b/data/fzsd/functions/module/health/uninstall.mcfunction @@ -2,7 +2,7 @@ scoreboard objectives remove fzsd.module.health data remove storage fzsd:config fzsd.module.health ## 标记为已卸载 -data modify storage fzsd:installed fzsd.module.health set value 0b +data modify storage fzsd:install fzsd.module.health set value 0b ## 日志 diff --git a/data/fzsd/functions/module/here/install.mcfunction b/data/fzsd/functions/module/here/install.mcfunction index ba932e9..77f445c 100644 --- a/data/fzsd/functions/module/here/install.mcfunction +++ b/data/fzsd/functions/module/here/install.mcfunction @@ -1,5 +1,5 @@ ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.here set value 1b +data modify storage fzsd:install fzsd.module.here set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:玩家位置"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/here/interactor/display.mcfunction b/data/fzsd/functions/module/here/interactor/display.mcfunction index a299d68..a0cb0ca 100644 --- a/data/fzsd/functions/module/here/interactor/display.mcfunction +++ b/data/fzsd/functions/module/here/interactor/display.mcfunction @@ -1 +1 @@ -execute if data storage fzsd:installed fzsd.module{last_nether_portal:1b} run tellraw @s [{"text": "获取位置:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2000"}},{"text": "私信", "color": "aqua"},{"text": "]"}], [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:所有人"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2010"}},{"text": "广播", "color": "aqua"},{"text": "]"}]] \ No newline at end of file +execute if data storage fzsd:install fzsd.module{last_nether_portal:1b} run tellraw @s [{"text": "获取位置:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2000"}},{"text": "私信", "color": "aqua"},{"text": "]"}], [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:所有人"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2010"}},{"text": "广播", "color": "aqua"},{"text": "]"}]] \ No newline at end of file diff --git a/data/fzsd/functions/module/here/uninstall.mcfunction b/data/fzsd/functions/module/here/uninstall.mcfunction index 227fbe2..010ea0e 100644 --- a/data/fzsd/functions/module/here/uninstall.mcfunction +++ b/data/fzsd/functions/module/here/uninstall.mcfunction @@ -1,7 +1,7 @@ data remove storage fzsd:here fzsd ## 标记为已卸载 -data modify storage fzsd:installed fzsd.module.here set value 0b +data modify storage fzsd:install fzsd.module.here set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:玩家位置"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/interactor/event/advamcement/on_click.mcfunction b/data/fzsd/functions/module/interactor/event/advamcement/on_click.mcfunction new file mode 100644 index 0000000..9758929 --- /dev/null +++ b/data/fzsd/functions/module/interactor/event/advamcement/on_click.mcfunction @@ -0,0 +1,5 @@ +execute if data storage fzsd:install fzsd.module{interactor: 1b} run function fzsd:module/interactor/event/on_click + +function #fzsd:module/interactor/reset_trigger +## 重置进度 +advancement revoke @s only fzsd:module/interactor/on_click \ No newline at end of file diff --git a/data/fzsd/functions/module/interactor/event/on_click.mcfunction b/data/fzsd/functions/module/interactor/event/on_click.mcfunction index 51a92db..21416c8 100644 --- a/data/fzsd/functions/module/interactor/event/on_click.mcfunction +++ b/data/fzsd/functions/module/interactor/event/on_click.mcfunction @@ -1,7 +1,4 @@ ## 运行事件 function #fzsd:module/interactor/event/on_click ## 触发器分数为正数时重新显示交互器按钮,为负数时不显示 -execute if score @s fzsd.module.interactor.trigger matches 1.. run function #fzsd:module/interactor/display -function #fzsd:module/interactor/reset_trigger -## 重置进度 -advancement revoke @s only fzsd:module/interactor/on_click \ No newline at end of file +execute if score @s fzsd.module.interactor.trigger matches 1.. run function #fzsd:module/interactor/display \ No newline at end of file diff --git a/data/fzsd/functions/module/interactor/event/on_unsneak/on_unsneak.mcfunction b/data/fzsd/functions/module/interactor/event/on_unsneak/on_unsneak.mcfunction index 95dd233..2640be0 100644 --- a/data/fzsd/functions/module/interactor/event/on_unsneak/on_unsneak.mcfunction +++ b/data/fzsd/functions/module/interactor/event/on_unsneak/on_unsneak.mcfunction @@ -1,3 +1,3 @@ # 本目录用于存放向事件中注册的函数,并不用来新建事件 -execute unless score @s fzsd.module.interactor.player.config matches -1 if entity @s[x_rotation = -90] run function #fzsd:module/interactor/event/on_start_interact \ No newline at end of file +execute if data storage fzsd:install fzsd.module{interactor: 1b} unless score @s fzsd.module.interactor.player.config matches -1 if entity @s[x_rotation = -90] run function #fzsd:module/interactor/event/on_start_interact \ No newline at end of file diff --git a/data/fzsd/functions/module/interactor/install.mcfunction b/data/fzsd/functions/module/interactor/install.mcfunction index 774d8d2..501a4d7 100644 --- a/data/fzsd/functions/module/interactor/install.mcfunction +++ b/data/fzsd/functions/module/interactor/install.mcfunction @@ -2,7 +2,7 @@ scoreboard objectives add fzsd.module.interactor.trigger trigger scoreboard objectives add fzsd.module.interactor.player.config dummy ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.interactor set value 1b +data modify storage fzsd:install fzsd.module.interactor set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:配置"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/interactor/uninstall.mcfunction b/data/fzsd/functions/module/interactor/uninstall.mcfunction index 4037483..20b5a18 100644 --- a/data/fzsd/functions/module/interactor/uninstall.mcfunction +++ b/data/fzsd/functions/module/interactor/uninstall.mcfunction @@ -3,7 +3,7 @@ schedule clear fzsd:module/interactor/loop scoreboard objectives remove fzsd.module.interactor.trigger ## 标记为已卸载 -data modify storage fzsd:installed fzsd.module.interactor set value 0b +data modify storage fzsd:install fzsd.module.interactor set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:配置"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/join_message/install.mcfunction b/data/fzsd/functions/module/join_message/install.mcfunction index 80b792f..3129a27 100644 --- a/data/fzsd/functions/module/join_message/install.mcfunction +++ b/data/fzsd/functions/module/join_message/install.mcfunction @@ -1,5 +1,5 @@ ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.join_message set value 1b +data modify storage fzsd:install fzsd.module.join_message set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:进服消息"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/join_message/uninstall.mcfunction b/data/fzsd/functions/module/join_message/uninstall.mcfunction index 75dd6c4..bf9aa43 100644 --- a/data/fzsd/functions/module/join_message/uninstall.mcfunction +++ b/data/fzsd/functions/module/join_message/uninstall.mcfunction @@ -1,5 +1,5 @@ ## 标记为已卸载 -data modify storage fzsd:installed fzsd.module.join_message set value 0b +data modify storage fzsd:install fzsd.module.join_message set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:进服消息"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_death/install.mcfunction b/data/fzsd/functions/module/last_death/install.mcfunction index eddec75..94d6724 100644 --- a/data/fzsd/functions/module/last_death/install.mcfunction +++ b/data/fzsd/functions/module/last_death/install.mcfunction @@ -1,5 +1,5 @@ ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.last_death set value 1b +data modify storage fzsd:install fzsd.module.last_death set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:上一死亡点"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_death/interactor/display.mcfunction b/data/fzsd/functions/module/last_death/interactor/display.mcfunction index 2b5e574..8f3a1ad 100644 --- a/data/fzsd/functions/module/last_death/interactor/display.mcfunction +++ b/data/fzsd/functions/module/last_death/interactor/display.mcfunction @@ -1 +1 @@ -execute if data storage fzsd:installed fzsd.module{last_death:1b} run tellraw @s [{"text": "获取上一死亡点:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2100"}},{"text": "私信", "color": "aqua"},{"text": "]"}]] \ No newline at end of file +execute if data storage fzsd:install fzsd.module{last_death:1b} run tellraw @s [{"text": "获取上一死亡点:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2100"}},{"text": "私信", "color": "aqua"},{"text": "]"}]] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_death/uninstall.mcfunction b/data/fzsd/functions/module/last_death/uninstall.mcfunction index 668e5d9..6de53dd 100644 --- a/data/fzsd/functions/module/last_death/uninstall.mcfunction +++ b/data/fzsd/functions/module/last_death/uninstall.mcfunction @@ -1,7 +1,7 @@ data remove storage fzsd:last_death fzsd ## 标记为已卸载 -data modify storage fzsd:installed fzsd.module.last_death set value 0b +data modify storage fzsd:install fzsd.module.last_death set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:上一死亡点"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_nether_portal/install.mcfunction b/data/fzsd/functions/module/last_nether_portal/install.mcfunction index 7d57311..38d60f7 100644 --- a/data/fzsd/functions/module/last_nether_portal/install.mcfunction +++ b/data/fzsd/functions/module/last_nether_portal/install.mcfunction @@ -5,7 +5,7 @@ scoreboard objectives add fzsd.module.last_nether_portal.z dummy data modify storage fzsd:last_nether_portal fzsd.message set value '[{"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.x"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.z"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.z"}}, {"text": "]"}]]' ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.last_nether_portal set value 1b +data modify storage fzsd:install fzsd.module.last_nether_portal set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:上次穿出的下界传送门"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_nether_portal/interactor/display.mcfunction b/data/fzsd/functions/module/last_nether_portal/interactor/display.mcfunction index 546aaab..5207438 100644 --- a/data/fzsd/functions/module/last_nether_portal/interactor/display.mcfunction +++ b/data/fzsd/functions/module/last_nether_portal/interactor/display.mcfunction @@ -1 +1 @@ -execute if data storage fzsd:installed fzsd.module{last_nether_portal:1b} run tellraw @s [{"text": "获取上次穿出的下界传送门:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2200"}},{"text": "私信", "color": "aqua"},{"text": "]"}], [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:所有人"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2210"}},{"text": "广播", "color": "aqua"},{"text": "]"}]] \ No newline at end of file +execute if data storage fzsd:install fzsd.module{last_nether_portal:1b} run tellraw @s [{"text": "获取上次穿出的下界传送门:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2200"}},{"text": "私信", "color": "aqua"},{"text": "]"}], [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:所有人"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2210"}},{"text": "广播", "color": "aqua"},{"text": "]"}]] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_nether_portal/uninstall.mcfunction b/data/fzsd/functions/module/last_nether_portal/uninstall.mcfunction index 579ef05..89d5b7f 100644 --- a/data/fzsd/functions/module/last_nether_portal/uninstall.mcfunction +++ b/data/fzsd/functions/module/last_nether_portal/uninstall.mcfunction @@ -5,7 +5,7 @@ scoreboard objectives remove fzsd.module.last_nether_portal.z data remove storage fzsd:last_nether_portal fzsd ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.last_nether_portal set value 0b +data modify storage fzsd:install fzsd.module.last_nether_portal set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:上次穿出的下界传送门"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_spawn_point/install.mcfunction b/data/fzsd/functions/module/last_spawn_point/install.mcfunction index cde0d40..72c3044 100644 --- a/data/fzsd/functions/module/last_spawn_point/install.mcfunction +++ b/data/fzsd/functions/module/last_spawn_point/install.mcfunction @@ -1,5 +1,5 @@ ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.last_spawn_point set value 1b +data modify storage fzsd:install fzsd.module.last_spawn_point set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:上一出生点"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_spawn_point/interactor/display.mcfunction b/data/fzsd/functions/module/last_spawn_point/interactor/display.mcfunction index 16cd166..834c54f 100644 --- a/data/fzsd/functions/module/last_spawn_point/interactor/display.mcfunction +++ b/data/fzsd/functions/module/last_spawn_point/interactor/display.mcfunction @@ -1 +1 @@ -execute if data storage fzsd:installed fzsd.module{last_spawn_point:1b} run tellraw @s [{"text": "获取上一出生点:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2300"}},{"text": "私信", "color": "aqua"},{"text": "]"}]] \ No newline at end of file +execute if data storage fzsd:install fzsd.module{last_spawn_point:1b} run tellraw @s [{"text": "获取上一出生点:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2300"}},{"text": "私信", "color": "aqua"},{"text": "]"}]] \ No newline at end of file diff --git a/data/fzsd/functions/module/last_spawn_point/uninstall.mcfunction b/data/fzsd/functions/module/last_spawn_point/uninstall.mcfunction index 8310ef0..9a8f75a 100644 --- a/data/fzsd/functions/module/last_spawn_point/uninstall.mcfunction +++ b/data/fzsd/functions/module/last_spawn_point/uninstall.mcfunction @@ -1,5 +1,5 @@ ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.last_spawn_point set value 0b +data modify storage fzsd:install fzsd.module.last_spawn_point set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:上一出生点"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/install.mcfunction b/data/fzsd/functions/module/scoreboard/install.mcfunction index 8b9f691..034815e 100644 --- a/data/fzsd/functions/module/scoreboard/install.mcfunction +++ b/data/fzsd/functions/module/scoreboard/install.mcfunction @@ -57,7 +57,7 @@ team modify fzsd.module.scoreboard.fake prefix {"text": "假的"} team modify fzsd.module.scoreboard.shadow prefix {"text": "挂机"} ## 标记为已安装 -data modify storage fzsd:installed fzsd.module.scoreboard set value 1b +data modify storage fzsd:install fzsd.module.scoreboard set value 1b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:计分板"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/interactor/display.mcfunction b/data/fzsd/functions/module/scoreboard/interactor/display.mcfunction index f93a4af..56582ba 100644 --- a/data/fzsd/functions/module/scoreboard/interactor/display.mcfunction +++ b/data/fzsd/functions/module/scoreboard/interactor/display.mcfunction @@ -1,5 +1,5 @@ # 调用者:#fzsd:module/scoreboard/interactor/display -execute if data storage fzsd:installed fzsd.module{scoreboard:1b} run tellraw @s {"text": "计分板:"} +execute if data storage fzsd:install fzsd.module{scoreboard:1b} run tellraw @s {"text": "计分板:"} -execute if data storage fzsd:installed fzsd.module{scoreboard:1b} run tellraw @s [[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "关", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1000"}}, {"text": "关", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1010"}}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.general", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1020"}}, {"nbt": "fzsd.scoreboard.text.general", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.activation", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1030"}}, {"nbt": "fzsd.scoreboard.text.activation", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.aviating_distance", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1040"}}, {"nbt": "fzsd.scoreboard.text.aviating_distance", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.damage_taken", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1050"}}, {"nbt": "fzsd.scoreboard.text.damage_taken", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.death_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1060"}}, {"nbt": "fzsd.scoreboard.text.death_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.dig_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1070"}}, {"nbt": "fzsd.scoreboard.text.dig_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.fishing_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1080"}}, {"nbt": "fzsd.scoreboard.text.fishing_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.kill_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1090"}}, {"nbt": "fzsd.scoreboard.text.kill_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.trade_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1100"}}, {"nbt": "fzsd.scoreboard.text.trade_count", "interpret": true, "storage": "fzsd:module"}, {"text": "]"}]] \ No newline at end of file +execute if data storage fzsd:install fzsd.module{scoreboard:1b} run tellraw @s [[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "关", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1000"}}, {"text": "关", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1010"}}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.general", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1020"}}, {"nbt": "fzsd.scoreboard.text.general", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.activation", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1030"}}, {"nbt": "fzsd.scoreboard.text.activation", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.aviating_distance", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1040"}}, {"nbt": "fzsd.scoreboard.text.aviating_distance", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.damage_taken", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1050"}}, {"nbt": "fzsd.scoreboard.text.damage_taken", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.death_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1060"}}, {"nbt": "fzsd.scoreboard.text.death_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.dig_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1070"}}, {"nbt": "fzsd.scoreboard.text.dig_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.fishing_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1080"}}, {"nbt": "fzsd.scoreboard.text.fishing_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.kill_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1090"}}, {"nbt": "fzsd.scoreboard.text.kill_count", "interpret": true, "storage": "fzsd:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fzsd.scoreboard.text.trade_count", "interpret": true, "storage": "fzsd:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1100"}}, {"nbt": "fzsd.scoreboard.text.trade_count", "interpret": true, "storage": "fzsd:module"}, {"text": "]"}]] \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/uninstall.mcfunction b/data/fzsd/functions/module/scoreboard/uninstall.mcfunction index 6a30ff6..61333fa 100644 --- a/data/fzsd/functions/module/scoreboard/uninstall.mcfunction +++ b/data/fzsd/functions/module/scoreboard/uninstall.mcfunction @@ -28,7 +28,7 @@ team remove fzsd.module.scoreboard.shadow execute if score fzsd.logger.level fzsd.variable.integer matches ..600 run tellraw @s [{"nbt": "fzsd.level.alert", "interpret": true, "storage": "fzsd:logger"}, {"text": "您要删除计分板数据吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fzsd:module/scoreboard/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}] ## 标记为已卸载 -data modify storage fzsd:installed fzsd.module.scoreboard set value 0b +data modify storage fzsd:install fzsd.module.scoreboard set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:计分板"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/try_install.mcfunction b/data/fzsd/functions/module/try_install.mcfunction index d57980f..0a3278e 100644 --- a/data/fzsd/functions/module/try_install.mcfunction +++ b/data/fzsd/functions/module/try_install.mcfunction @@ -1,11 +1,11 @@ # 调用者:#fzsd:module/try_install ## 判断是否需要安装 -execute unless data storage fzsd:installed fzsd.module{health:0b} run function #fzsd:module/health/install -execute unless data storage fzsd:installed fzsd.module{here:0b} run function #fzsd:module/here/install -execute unless data storage fzsd:installed fzsd.module{interactor:0b} run function #fzsd:module/interactor/install -execute unless data storage fzsd:installed fzsd.module{join_message:0b} run function #fzsd:module/join_message/install -execute unless data storage fzsd:installed fzsd.module{last_death:0b} run function #fzsd:module/last_death/install -execute unless data storage fzsd:installed fzsd.module{last_nether_portal:0b} run function #fzsd:module/last_nether_portal/install -execute unless data storage fzsd:installed fzsd.module{last_spawn_point:0b} run function #fzsd:module/last_spawn_point/install -execute unless data storage fzsd:installed fzsd.module{scoreboard:0b} run function #fzsd:module/scoreboard/install +execute unless data storage fzsd:install fzsd.module{health:0b} run function #fzsd:module/health/install +execute unless data storage fzsd:install fzsd.module{here:0b} run function #fzsd:module/here/install +execute unless data storage fzsd:install fzsd.module{interactor:0b} run function #fzsd:module/interactor/install +execute unless data storage fzsd:install fzsd.module{join_message:0b} run function #fzsd:module/join_message/install +execute unless data storage fzsd:install fzsd.module{last_death:0b} run function #fzsd:module/last_death/install +execute unless data storage fzsd:install fzsd.module{last_nether_portal:0b} run function #fzsd:module/last_nether_portal/install +execute unless data storage fzsd:install fzsd.module{last_spawn_point:0b} run function #fzsd:module/last_spawn_point/install +execute unless data storage fzsd:install fzsd.module{scoreboard:0b} run function #fzsd:module/scoreboard/install diff --git a/data/fzsd/functions/module/try_load.mcfunction b/data/fzsd/functions/module/try_load.mcfunction index ddcf4bf..48b411c 100644 --- a/data/fzsd/functions/module/try_load.mcfunction +++ b/data/fzsd/functions/module/try_load.mcfunction @@ -1,6 +1,6 @@ # 调用者:#fzsd:module/try_load ## 判断是否安装,如果安装则加载 -execute if data storage fzsd:installed fzsd.module{health:1b} run function #fzsd:module/health/load -execute if data storage fzsd:installed fzsd.module{interactor:1b} run function #fzsd:module/interactor/load -execute if data storage fzsd:installed fzsd.module{scoreboard:1b} run function #fzsd:module/scoreboard/load +execute if data storage fzsd:install fzsd.module{health:1b} run function #fzsd:module/health/load +execute if data storage fzsd:install fzsd.module{interactor:1b} run function #fzsd:module/interactor/load +execute if data storage fzsd:install fzsd.module{scoreboard:1b} run function #fzsd:module/scoreboard/load diff --git a/data/fzsd/functions/system/install/after.mcfunction b/data/fzsd/functions/system/install/after.mcfunction index d4ba957..9e72e1e 100644 --- a/data/fzsd/functions/system/install/after.mcfunction +++ b/data/fzsd/functions/system/install/after.mcfunction @@ -1,5 +1,5 @@ ## 标记为已安装 -data modify storage fzsd:installed fzsd.global set value 1b +data modify storage fzsd:install fzsd.global set value 1b ## 日志 tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "安装完成!"}] \ No newline at end of file diff --git a/data/fzsd/functions/system/uninstall/uninstalled.mcfunction b/data/fzsd/functions/system/uninstall/after.mcfunction similarity index 78% rename from data/fzsd/functions/system/uninstall/uninstalled.mcfunction rename to data/fzsd/functions/system/uninstall/after.mcfunction index 010a330..e562f2e 100644 --- a/data/fzsd/functions/system/uninstall/uninstalled.mcfunction +++ b/data/fzsd/functions/system/uninstall/after.mcfunction @@ -1,5 +1,5 @@ ## 标记为已卸载 -data modify storage fzsd:installed fzsd.global set value 0b +data modify storage fzsd:install fzsd.global set value 0b ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "卸载完成!"}] \ No newline at end of file diff --git a/data/fzsd/tags/functions/system/uninstall/after.json b/data/fzsd/tags/functions/system/uninstall/after.json index bf81b5c..fdff053 100644 --- a/data/fzsd/tags/functions/system/uninstall/after.json +++ b/data/fzsd/tags/functions/system/uninstall/after.json @@ -2,6 +2,6 @@ "replace": false, "__comment": "将在卸载后恢复安装记录", "values": [ - "fzsd:system/uninstall/uninstalled" + "fzsd:system/uninstall/after" ] } \ No newline at end of file