Compare commits

..

3 Commits

Author SHA1 Message Date
延皓 525e1a0865 修复自动升级相关bug 2022-08-02 01:43:37 +08:00
延皓 24bb299869 fix fzsd_score.sc 2022-08-02 01:21:45 +08:00
延皓 26dac885cb fix README 2022-08-02 01:09:40 +08:00
15 changed files with 18 additions and 19 deletions
+2 -2
View File
@@ -27,7 +27,7 @@
## *目前仍在测试阶段,请先备份服务器再使用!* ## *目前仍在测试阶段,请先备份服务器再使用!*
[![数据包版本](https://img.shields.io/badge/测试版-3.0+beta.7-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases/v3.0-beta.6) [![MC版本](https://img.shields.io/badge/Minecraft-1.19+-blue.svg)](https://minecraft.net/) [![数据包版本](https://img.shields.io/badge/测试版-3.0+beta.8-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases/v3.0-beta.8) [![MC版本](https://img.shields.io/badge/Minecraft-1.19+-blue.svg)](https://minecraft.net/)
> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases) > 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
@@ -64,7 +64,7 @@
- 可避免Carpet假人污染计分板 - 可避免Carpet假人污染计分板
- 执行 `reload` 指令后自动生效 - 执行 `reload` 指令后自动生效
- 子命令( `/fzsd_score <子命令>` ): - 子命令( `/fzsd_score <子命令>` ):
- `merge_old <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!) - `update_from <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!)
- `recalculate_total`:重新计算总分 - `recalculate_total`:重新计算总分
### 其他 ### 其他
+1 -1
View File
@@ -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.7'}} execute store success storage fzsd:version fzsd.need_update int 1 run data merge storage fzsd:version {fzsd: {version: '3.0.0-beta.8'}}
execute if data storage fzsd:version fzsd{need_update: 1} run function fzsd:system/update 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:system/carpet/try_load_fzsd_score
function #fzsd:load function #fzsd:load
@@ -2,8 +2,6 @@
execute store result storage fzsd:here fzsd.x int 1 run data get entity @s Pos[0] execute store result storage fzsd:here fzsd.x int 1 run data get entity @s Pos[0]
execute store result storage fzsd:here fzsd.y int 1 run data get entity @s Pos[1] execute store result storage fzsd:here fzsd.y int 1 run data get entity @s Pos[1]
execute store result storage fzsd:here fzsd.z int 1 run data get entity @s Pos[2] execute store result storage fzsd:here fzsd.z int 1 run data get entity @s Pos[2]
data modify storage fzsd:here fzsd.message.dimension set from storage fzsd:global fzsd.api.dimension.name
data modify storage fzsd:here fzsd.message.position set value '[{"text": "[", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}]'
data modify storage fzsd:here fzsd.message.append set value '' data modify storage fzsd:here fzsd.message.append set value ''
## ##
@@ -1 +1 @@
tellraw @a [{"text": "", "color": "white"}, {"selector": "@s"}, {"text": "说:"}, {"text": "我在"}, {"nbt": "fzsd.message.dimension", "interpret": true, "storage": "fzsd:here"}, {"nbt": "fzsd.message.position", "interpret": true, "storage": "fzsd:here"}, {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}] tellraw @a [{"selector": "@s"}, [{"text": "说:我在", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]]
@@ -1 +1 @@
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fzsd.message.dimension", "interpret": true, "storage": "fzsd:here"}, {"nbt": "fzsd.message.position", "interpret": true, "storage": "fzsd:here"}, {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}] tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]
@@ -1,2 +1,2 @@
execute if data entity @s LastDeathLocation run tellraw @s [{"text": "你上次死亡于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_death"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:last_death"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:last_death"}, {"text": "]"}]] execute if data entity @s LastDeathLocation run tellraw @s [{"text": "你上次死亡于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_death"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:last_death"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:last_death"}, {"text": "]"}]]
execute unless data entity @s LastDeathLocation run tellraw @s {"text": "你从未死亡!"} execute unless data entity @s LastDeathLocation run tellraw @s {"text": "你从未死亡!"}
@@ -1,2 +1,2 @@
execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @a [{"selector": "@s"}, [{"text": "说:我上次穿出的下界传送门位于", "color": "white"}, {"nbt": "fzsd.message", "interpret": true, "storage": "fzsd:last_nether_portal"}]] execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @a [{"selector": "@s"}, [{"text": "说:我上次穿出的下界传送门位于", "color": "white"}, {"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": "]"}]]]
execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"} execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"}
@@ -2,7 +2,6 @@ scoreboard objectives add fzsd.module.last_nether_portal.dimension dummy
scoreboard objectives add fzsd.module.last_nether_portal.x dummy scoreboard objectives add fzsd.module.last_nether_portal.x dummy
scoreboard objectives add fzsd.module.last_nether_portal.y dummy scoreboard objectives add fzsd.module.last_nether_portal.y dummy
scoreboard objectives add fzsd.module.last_nether_portal.z dummy 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:install fzsd.module.last_nether_portal set value 1b data modify storage fzsd:install fzsd.module.last_nether_portal set value 1b
@@ -1,2 +1,2 @@
execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s [{"text": "你上次穿出的下界传送门位于"}, {"nbt": "fzsd.message", "interpret": true, "storage": "fzsd:last_nether_portal"}] execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s [{"text": "你上次穿出的下界传送门位于"}, {"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": "]"}]]
execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"} execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"}
@@ -1,2 +1,2 @@
execute if data entity @s SpawnDimension run tellraw @s [{"text": "你的上个出生点位于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[x: ", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_spawn_point"}, {"text": ", y: "}, {"nbt": "fzsd.y", "storage": "fzsd:last_spawn_point"}, {"text": ", z: "}, {"nbt": "fzsd.z", "storage": "fzsd:last_spawn_point"}, {"text": "]"}]] execute if data entity @s SpawnDimension run tellraw @s [{"text": "你的上个出生点位于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:last_spawn_point"}, {"text": "]"}]]
execute unless data entity @s SpawnDimension run tellraw @s {"text": "你从未设置过出生点!"} execute unless data entity @s SpawnDimension run tellraw @s {"text": "你从未设置过出生点!"}
@@ -1,2 +1,2 @@
## ##
data modify storage fzsd:installed fzsd.cache set from storage fzsd:installed fzsd.module data modify storage fzsd:install fzsd.cache set from storage fzsd:install fzsd.module
@@ -1,3 +1,3 @@
## ##
data modify storage fzsd:installed fzsd.module set from storage fzsd:installed fzsd.cache data modify storage fzsd:install fzsd.module set from storage fzsd:install fzsd.cache
data remove storage fzsd:installed fzsd.cache data remove storage fzsd:install fzsd.cache
+1 -1
View File
@@ -1,2 +1,2 @@
execute if data storage fzsd:installed fzsd{global: 1b} run function #fzsd:uninstall execute if data storage fzsd:install fzsd{global: 1b} run function #fzsd:uninstall
function #fzsd:install function #fzsd:install
+1 -1
View File
@@ -5,8 +5,8 @@
"#fzsd:system/uninstall/before", "#fzsd:system/uninstall/before",
"fzsd:system/uninstall/cache_module_install_data", "fzsd:system/uninstall/cache_module_install_data",
"#fzsd:system/uninstall/module", "#fzsd:system/uninstall/module",
"fzsd:system/uninstall/restore_module_install_data",
"#fzsd:system/uninstall/system", "#fzsd:system/uninstall/system",
"fzsd:system/uninstall/restore_module_install_data",
"#fzsd:system/uninstall/after" "#fzsd:system/uninstall/after"
] ]
} }
+4 -2
View File
@@ -1,7 +1,7 @@
// 计分板模块扩展插件 // 计分板模块扩展插件
// 忽略假人分数 // 忽略假人分数
// **请勿修改文件名** // **请勿修改文件名**
global_app_version = '1.0-beta.5'; global_app_version = '1.0-beta.6';
__config() -> { __config() -> {
'scope' -> 'global', 'scope' -> 'global',
@@ -154,6 +154,8 @@ merge_score(from, to, fzsd_version) -> (
// 如果目标计分板不存在则创建 // 如果目标计分板不存在则创建
if(scoreboard() ~ to == null, scoreboard_add(to)); if(scoreboard() ~ to == null, scoreboard_add(to));
// new_players = [];
if(fzsd_version == '2.x', if(fzsd_version == '2.x',
( (
// 2.x数据包的假人列表 // 2.x数据包的假人列表
@@ -171,7 +173,7 @@ merge_score(from, to, fzsd_version) -> (
); );
for(scoreboard(from), for(scoreboard(from),
if(contains(new_players, _) && !(_ ~ '\\W'), if(!(_ ~ '\\W'),
scoreboard(to, _, scoreboard(to, _) + scoreboard(from, _)); scoreboard(to, _, scoreboard(to, _) + scoreboard(from, _));
); );
); );