Compare commits

..

16 Commits

Author SHA1 Message Date
Harvey_Husky 09fcbb7891 update version 2023-07-24 19:49:46 +08:00
Harvey_Husky e13ab7619c Merge branch 'dev/3.1' of https://gitee.com/harvey-husky/fz-survival-datapack into dev/3.1 2023-07-24 19:46:30 +08:00
Harvey_Husky cfbd6da92a 破基岩榜改为深灰色;避免int型数据溢出污染记分板。脚本:不再缓存服务器白名单 2023-07-24 19:46:24 +08:00
延皓 b3582c3bab update README.md.
Signed-off-by: 延皓 <harvey_husky@qq.com>
2023-06-30 06:27:32 +00:00
Harvey_Husky 2a96a9ee3a update README.md 2023-06-26 12:48:45 +08:00
Harvey_Husky 4e79e3209e 忘了加管理员按钮了。。 2023-06-26 12:44:26 +08:00
Harvey_Husky 09fac1082a fix 2023-06-26 12:35:59 +08:00
Harvey_Husky 44d7a24b1b Merge branch 'dev/3.1' of https://gitee.com/harvey-husky/fz-survival-datapack into dev/3.1 2023-06-26 08:28:45 +08:00
Harvey_Husky 667822c436 添加幻翼提醒;在重装后会自动重载 2023-06-26 08:28:40 +08:00
延皓 02330aec55 update README.md.
Signed-off-by: 延皓 <harvey_husky@qq.com>
2023-06-08 09:59:29 +00:00
Harvey_Husky 05853884de 新功能:
- fzsd_score.sc:禁止生成白名单玩家,可能在carpet1.4.112可用
2023-06-08 17:44:31 +08:00
Harvey_Husky 5ea4c7461f fix 版本号 2023-06-06 19:49:21 +08:00
Harvey_Husky 648898966e update readme.md 2023-06-06 19:47:13 +08:00
Harvey_Husky 153439abfc rc.1 2023-06-06 19:46:24 +08:00
Harvey_Husky b4b296ea9b mc1.20! 2023-06-06 19:43:35 +08:00
延皓 b1ea5bb682 update README.md.
Signed-off-by: 延皓 <8511461+harvey-husky@user.noreply.gitee.com>
2023-04-17 12:43:50 +00:00
86 changed files with 478 additions and 207 deletions
+2 -3
View File
@@ -17,7 +17,6 @@
"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 fzsd:installed fzsd.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.cmdVersion": "1.20",
"datapack.env.jsonVersion": "1.19", "datapack.env.dataVersion": "1.20"
"datapack.env.dataVersion": "1.19"
} }
+2 -2
View File
@@ -1,9 +1,9 @@
FZSD许可协议 FZSD许可协议
2022/11/19 https://gitee.com/harvey-husky/fz-survival-datapack/blob/dev/3.0/LICENSE 2023/6/6 https://gitee.com/harvey-husky/fz-survival-datapack/blob/dev/3.0/LICENSE
版权所有 © 2019-2022 延皓<https://gitee.com/harvey-husky><https://space.bilibili.com/677233356> 版权所有 © 2019-2023 延皓<https://gitee.com/harvey-husky><https://space.bilibili.com/677233356>
定义: 定义:
“该许可协议”指FZSD许可协议。 “该许可协议”指FZSD许可协议。
+36 -17
View File
@@ -4,13 +4,14 @@
#### @Author: Harvey_Husky #### @Author: Harvey_Husky
#### Copyright (C) 2019-2022 Harvey_Husky #### Copyright (C) 2019-2023 Harvey_Husky
[Bilibili专栏](https://www.bilibili.com/read/cv4267319)(年久失修) [Bilibili专栏](https://www.bilibili.com/read/cv4267319)(年久失修)
## 安装教程 ## 安装教程
1. 兼容性 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`
- `数据包 v2.2.x` 支持 `Minecraft 1.19.x` - `数据包 v2.2.x` 支持 `Minecraft 1.19.x`
- `数据包 v2.1.x` 支持 `Minecraft 1.17.x-1.18.x` - `数据包 v2.1.x` 支持 `Minecraft 1.17.x-1.18.x`
@@ -22,10 +23,9 @@
6. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` 6. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts`
7. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload` 7. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`
# FZ生存数据包 3.1
# FZ生存数据包 3.0 [![数据包版本](https://img.shields.io/badge/正式版-3.1.2-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.0.5-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [![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)
@@ -39,18 +39,18 @@
- 提供下列计分板: - 提供下列计分板:
| 默认名称 | 计分板ID | | 默认名称 | 计分板ID |
| :------: | :----------------------------------------------: | | :------: | :----------------------------------------------: |
| 总榜 | fzsd.module.scoreboard.display.general | | 总榜 | fzsd.module.scoreboard.display.general |
| 活跃度 | fzsd.module.scoreboard.display.activation | | 活跃度 | fzsd.module.scoreboard.display.activation |
| 飞行距离 | fzsd.module.scoreboard.display.aviating_distance | | 飞行距离 | fzsd.module.scoreboard.display.aviating_distance |
| 抖M榜 | fzsd.module.scoreboard.display.damage_taken | | 抖M榜 | fzsd.module.scoreboard.display.damage_taken |
| 死亡榜 | fzsd.module.scoreboard.display.death_count | | 死亡榜 | fzsd.module.scoreboard.display.death_count |
| 挖掘榜 | fzsd.module.scoreboard.display.dig_count | | 挖掘榜 | fzsd.module.scoreboard.display.dig_count |
| 钓鱼榜 | fzsd.module.scoreboard.display.fishing_count | | 钓鱼榜 | fzsd.module.scoreboard.display.fishing_count |
| 击杀榜 | fzsd.module.scoreboard.display.kill_count | | 击杀榜 | fzsd.module.scoreboard.display.kill_count |
| 放置榜 | fzsd.module.scoreboard.display.placement_count | | 放置榜 | fzsd.module.scoreboard.display.placement_count |
| 交易榜 | fzsd.module.scoreboard.display.trade_count | | 交易榜 | fzsd.module.scoreboard.display.trade_count |
- 兼容[破基岩榜Mod](https://gitee.com/harvey-husky/yh-bbl) - 兼容[破基岩榜Mod](https://gitee.com/harvey-husky/yh-bbl)
- 安装该Mod后,使用连点器破基岩,破基岩榜将自动显示在交互器页面 - 安装该Mod后,使用连点器破基岩,破基岩榜将自动显示在交互器页面
@@ -59,6 +59,21 @@
| :------: | :----------------------------------------------: | | :------: | :----------------------------------------------: |
| 破基岩榜 |fzsd.module.scoreboard.display.bedrock_broken_count| | 破基岩榜 |fzsd.module.scoreboard.display.bedrock_broken_count|
- 系统总榜计分板:`fzsd.module.scoreboard.assign.general`
- 可以在在此记分板修改总分数据,下次加分时会刷新显示分数
- 总计分项名称对照表:
| 默认名称 | 计分板ID |
| :------: | :----------------------------------------------: |
| 总活跃时间 | fzsd.module.scoreboard.total.activation |
| 总飞行距离 | fzsd.module.scoreboard.total.aviating_distance |
| 总受伤害量 | fzsd.module.scoreboard.total.damage_taken |
| 总死亡数 | fzsd.module.scoreboard.total.death_count |
| 总挖掘量 | fzsd.module.scoreboard.total.dig_count |
| 总钓鱼数 | fzsd.module.scoreboard.total.fishing_count |
| 总击杀数 | fzsd.module.scoreboard.total.kill_count |
| 总放置方块数 | fzsd.module.scoreboard.total.placement_count |
| 总交易量 | fzsd.module.scoreboard.total.trade_count |
### 地毯脚本 ### 地毯脚本
@@ -66,7 +81,7 @@
- 需要安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases) - 需要安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases)
- 从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` - 从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts`
- 脚本: - 脚本:
- `fzsd_score.sc`(**开发中!此处列举目前已完成的**) - `fzsd_score.sc`
- 可避免Carpet假人污染计分板 - 可避免Carpet假人污染计分板
- 可以标记哪些玩家是假人 - 可以标记哪些玩家是假人
- *注:请不要使用为假人名添加“bot”前缀的carpet扩展,本插件不支持此类假人!* - *注:请不要使用为假人名添加“bot”前缀的carpet扩展,本插件不支持此类假人!*
@@ -84,6 +99,9 @@
- *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全* - *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全*
- `commandPlayer <permissionType>`:设置player命令权限类型 - `commandPlayer <permissionType>`:设置player命令权限类型
### 幻翼预警
- 首次使用需要先睡一觉
### 管理员 ### 管理员
- 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块 - 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块
@@ -93,4 +111,5 @@
- 见游戏内交互器按钮 - 见游戏内交互器按钮
## 开发者相关 ## 开发者相关
- 参见[开发文档](/DEVDOC.md) - 参见[开发文档](/DEVDOC.md)
@@ -36,3 +36,5 @@ tellraw @s [{"text": "计分板:"}, [{"text": "", "color": "dark_gray"}, [{"te
tellraw @s [{"text": "扫地机:"}, [{"text": "", "color": "dark_gray"}, [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/sweeper/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/sweeper/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/sweeper/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/sweeper/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/phantom_warning/install"}, "hoverEvent": {"action": "show_text", "contents": {"text": "安装", "color": "dark_green"}}}, {"text": "安装", "color": "dark_green"}, {"text": "]"}], [{"text": "[", "clickEvent": {"action": "run_command", "value": "/function #fzsd:module/phantom_warning/uninstall"}, "hoverEvent": {"action": "show_text", "contents": {"text": "卸载", "color": "dark_red"}}}, {"text": "卸载", "color": "dark_red"}, {"text": "]"}]]]
@@ -1,6 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"fzsd.extra.bbl:display/set_text/black" "fzsd.extra.bbl:display/set_text/dark_gray"
] ]
} }
@@ -4,7 +4,7 @@
"on_placed_block": { "on_placed_block": {
"trigger": "minecraft:placed_block", "trigger": "minecraft:placed_block",
"conditions": { "conditions": {
"player": [ "location": [
{ {
"condition": "minecraft:reference", "condition": "minecraft:reference",
"name": "fzsd:is_real_player" "name": "fzsd:is_real_player"
@@ -4,10 +4,24 @@
"on_placed_liquid": { "on_placed_liquid": {
"trigger": "minecraft:placed_block", "trigger": "minecraft:placed_block",
"conditions": { "conditions": {
"item": { "location": [
"tag": "fzsd:bucket_of_liquid" {
} "condition": "minecraft:reference",
"name": "fzsd:is_real_player"
},
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"tag": "fzsd:liquid"
}
}
}
]
} }
} }
},
"rewards": {
"function": "fzsd:game_event/advancement/on_placed_block/on_placed_liquid"
} }
} }
@@ -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": {
"tag": "fzsd:liquid"
}
}
}
}
]
}
}
},
"rewards": {
"function": "fzsd:game_event/advancement/on_placed_block/on_placed_solid"
}
}
@@ -0,0 +1,19 @@
{
"parent": "fzsd:game_event",
"criteria": {
"on_sleeping": {
"trigger": "minecraft:slept_in_bed",
"conditions": {
"player": [
{
"condition": "minecraft:reference",
"name": "fzsd:is_real_player"
}
]
}
}
},
"rewards": {
"function": "fzsd:game_event/advancement/on_sleeping"
}
}
@@ -4,21 +4,27 @@
"on_tools_exclude_axes_used_on_block": { "on_tools_exclude_axes_used_on_block": {
"trigger": "minecraft:item_used_on_block", "trigger": "minecraft:item_used_on_block",
"conditions": { "conditions": {
"player": [ "location": [
{ {
"condition": "minecraft:reference", "condition": "minecraft:reference",
"name": "fzsd:is_real_player" "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"
}
}
} }
], ]
"item": {
"tag": "fzsd:tool/axes"
},
"location": {
"__comment": "斧子剥树皮会触发两次,所以用目标方块限定只触发一次",
"block": {
"tag": "fzsd:stripped_blocks"
}
}
} }
} }
}, },
@@ -5,15 +5,18 @@
"__comment": "斧子剥树皮会触发两次!", "__comment": "斧子剥树皮会触发两次!",
"trigger": "minecraft:item_used_on_block", "trigger": "minecraft:item_used_on_block",
"conditions": { "conditions": {
"player": [ "location": [
{ {
"condition": "minecraft:reference", "condition": "minecraft:reference",
"name": "fzsd:is_real_player" "name": "fzsd:is_real_player"
},
{
"condition": "minecraft:match_tool",
"predicate": {
"tag": "fzsd:tools_exclude_axes"
}
} }
], ]
"item": {
"tag": "fzsd:tools_exclude_axes"
}
} }
} }
}, },
@@ -16,18 +16,11 @@
"flags": { "flags": {
"is_sneaking": false "is_sneaking": false
}, },
"__comment_type_specific": "1.19+",
"type_specific": { "type_specific": {
"type": "player", "type": "player",
"advancements": { "advancements": {
"fzsd:game_event/on_sneak": true "fzsd:game_event/on_sneak": true
} }
},
"__comment_player": "1.18 compat",
"player": {
"advancements": {
"fzsd:game_event/on_sneak": true
}
} }
} }
} }
@@ -10,7 +10,7 @@
"name": "fzsd:is_real_player" "name": "fzsd:is_real_player"
}, },
{ {
"condition": "minecraft:alternative", "condition": "minecraft:any_of",
"terms": [ "terms": [
{ {
"condition": "minecraft:entity_scores", "condition": "minecraft:entity_scores",
@@ -0,0 +1,2 @@
# 游戏时间范围:0-2147483647
execute store result score fzsd.var.cache fzsd.variable.integer run time query daytime
@@ -0,0 +1,2 @@
# 游戏时间范围:0-2147483647
execute store result score fzsd.var.cache fzsd.variable.integer run time query gametime
@@ -0,0 +1 @@
scoreboard players operation fzsd.var.cache fzsd.variable.integer = @s fzsd.api.time_since_rest
@@ -0,0 +1,5 @@
##
scoreboard objectives add fzsd.api.time_since_rest minecraft.custom:time_since_rest
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装系统组件:API"}]
@@ -0,0 +1,5 @@
##
scoreboard objectives remove fzsd.api.time_since_rest
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载系统组件:API"}]
+2 -2
View File
@@ -1,5 +1,5 @@
execute store success storage fzsd:version fzsd.need_update int 1 run data merge storage fzsd:version {fzsd: {version: '3.0.7'}} execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.2'}}
execute if data storage fzsd:version fzsd{need_update: 1} run function fzsd:system/update 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:system/carpet/try_load_fzsd_score
function #fzsd:load function #fzsd:load
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "FZ Survival Data Pack,当前版本:", "color": "gold"}, {"nbt":"fzsd.version", "storage": "fzsd:version", "color": "red"}] execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "FZ Survival Data Pack,当前版本:", "color": "gold"}, {"nbt":"fzsd.version", "storage": "fzsd:version", "color": "red"}]
@@ -1,10 +1,6 @@
# 调用者:advancements/fzsd:~ # 调用者:advancements/fzsd:~
##
execute if entity @s[advancements={fzsd:game_event/on_placed_block/on_placed_liquid=true}] run function #fzsd:game_event/player/on_placed_liquid
execute if entity @s[advancements={fzsd:game_event/on_placed_block/on_placed_liquid=false}] run function #fzsd:game_event/player/on_placed_solid
function #fzsd:game_event/player/on_placed_block function #fzsd:game_event/player/on_placed_block
## ##
advancement revoke @s from fzsd:game_event/on_placed_block advancement revoke @s from fzsd:game_event/on_placed_block
advancement revoke @s from fzsd:game_event/on_placed_block/on_placed_liquid
@@ -0,0 +1,9 @@
# 调用者: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_liquid
##
advancement revoke @s from fzsd:game_event/on_placed_block/on_placed_liquid
@@ -0,0 +1,9 @@
# 调用者: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_solid
##
advancement revoke @s from fzsd:game_event/on_placed_block/on_placed_solid
@@ -0,0 +1,10 @@
# 调用者: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_sleeping
##
advancement revoke @s from fzsd:game_event/on_sleeping
@@ -1,2 +0,0 @@
##
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": "放置了流体"}]
@@ -1,2 +0,0 @@
##
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": "放置了实体方块"}]
@@ -0,0 +1,7 @@
# 调用者:fzsd:game_event/game/on_night/on_tick
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:夜幕降临"}]
##
function #fzsd:game_event/game/on_night
@@ -0,0 +1,3 @@
# 由fzsd:game_event/on_tick事件调用
function #fzsd:api/get_current_daytime
execute if score fzsd.var.cache fzsd.variable.integer matches 12516 run function fzsd:game_event/game/on_night
@@ -1,4 +1,4 @@
# 调用者:fzsd:game_event/player/on_used_tool # 调用者:fzsd:game_event/player/on_broke_block_with_tool/try_trigger
## ##
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": "挖掘了方块"}] 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": "挖掘了方块"}]
@@ -1,2 +1,4 @@
# 调用者:#fzsd:game_event/player/on_used_tool
## ##
execute unless score fzsd.var.score fzsd.variable.integer matches ..0 run function fzsd:game_event/player/on_broke_block_with_tool execute unless score fzsd.var.score fzsd.variable.integer matches ..0 run function fzsd:game_event/player/on_broke_block_with_tool
@@ -1,5 +1,5 @@
## ##
execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了工具"}] execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了工具"}]
## ##
function #fzsd:game_event/player/on_used_tool function #fzsd:game_event/player/on_used_tool
@@ -31,5 +31,5 @@ scoreboard players set @s fzsd.event.used_tool.wooden_pickaxe 0
scoreboard players set @s fzsd.event.used_tool.wooden_shovel 0 scoreboard players set @s fzsd.event.used_tool.wooden_shovel 0
scoreboard players set @s fzsd.event.used_tool.wooden_sword 0 scoreboard players set @s fzsd.event.used_tool.wooden_sword 0
## ##
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": "的used_tool计分板"}] execute if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "重置了玩家"}, {"selector": "@s"}, {"text": "的used_tool计分板"}]
@@ -0,0 +1,3 @@
# TODO: 数字有待商榷
function #fzsd:api/get_time_since_rest
execute if score fzsd.var.cache fzsd.variable.integer matches 61766.. run function #fzsd:module/phantom_warning/send_phantom_warning
@@ -0,0 +1 @@
execute if data storage fzsd:install fzsd.module{phantom_warning:1b} as @a[predicate=fzsd:is_real_player] run function #fzsd:module/phantom_warning/check_time_since_rest
@@ -0,0 +1,5 @@
##
data modify storage fzsd:install fzsd.module.phantom_warning 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": "已安装组件:幻翼预警"}]
@@ -0,0 +1,5 @@
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..600 run tellraw @s [{"nbt": "fzsd.level.alert", "interpret": true, "storage": "fzsd: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": "事件已触发:已向玩家"}, {"selector": "@s"}, {"text": "发送幻翼预警"}]
@@ -0,0 +1 @@
execute unless data storage fzsd:install fzsd.module{phantom_warning:0b} run function #fzsd:module/phantom_warning/install
@@ -0,0 +1,5 @@
##
data modify storage fzsd:install fzsd.module.phantom_warning 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": "已卸载组件:幻翼预警"}]
@@ -1,2 +1,4 @@
scoreboard players add @s fzsd.module.scoreboard.display.activation 1 scoreboard players add @s fzsd.module.scoreboard.display.activation 1
execute if score @s fzsd.module.scoreboard.display.activation matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.activation 2147483647
scoreboard players add fzsd.module.scoreboard.total.activation fzsd.module.scoreboard.assign.general 1 scoreboard players add fzsd.module.scoreboard.total.activation fzsd.module.scoreboard.assign.general 1
execute if score fzsd.module.scoreboard.total.activation fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.activation fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players operation @s fzsd.module.scoreboard.display.aviating_distance += fzsd.var.score fzsd.variable.integer scoreboard players operation @s fzsd.module.scoreboard.display.aviating_distance += fzsd.var.score fzsd.variable.integer
execute if score @s fzsd.module.scoreboard.display.aviating_distance matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.aviating_distance 2147483647
scoreboard players operation fzsd.module.scoreboard.total.aviating_distance fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer scoreboard players operation fzsd.module.scoreboard.total.aviating_distance fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer
execute if score fzsd.module.scoreboard.total.aviating_distance fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.aviating_distance fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players operation @s fzsd.module.scoreboard.display.damage_taken += fzsd.var.score fzsd.variable.integer scoreboard players operation @s fzsd.module.scoreboard.display.damage_taken += fzsd.var.score fzsd.variable.integer
execute if score @s fzsd.module.scoreboard.display.damage_taken matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.damage_taken 2147483647
scoreboard players operation fzsd.module.scoreboard.total.damage_taken fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer scoreboard players operation fzsd.module.scoreboard.total.damage_taken fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer
execute if score fzsd.module.scoreboard.total.damage_taken fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.damage_taken fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players add @s fzsd.module.scoreboard.display.death_count 1 scoreboard players add @s fzsd.module.scoreboard.display.death_count 1
execute if score @s fzsd.module.scoreboard.display.death_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.death_count 2147483647
scoreboard players add fzsd.module.scoreboard.total.death_count fzsd.module.scoreboard.assign.general 1 scoreboard players add fzsd.module.scoreboard.total.death_count fzsd.module.scoreboard.assign.general 1
execute if score fzsd.module.scoreboard.total.death_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.death_count fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players operation @s fzsd.module.scoreboard.display.dig_count += fzsd.var.score fzsd.variable.integer scoreboard players operation @s fzsd.module.scoreboard.display.dig_count += fzsd.var.score fzsd.variable.integer
execute if score @s fzsd.module.scoreboard.display.dig_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.dig_count 2147483647
scoreboard players operation fzsd.module.scoreboard.total.dig_count fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer scoreboard players operation fzsd.module.scoreboard.total.dig_count fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer
execute if score fzsd.module.scoreboard.total.dig_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.dig_count fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players add @s fzsd.module.scoreboard.display.fishing_count 1 scoreboard players add @s fzsd.module.scoreboard.display.fishing_count 1
execute if score @s fzsd.module.scoreboard.display.fishing_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.fishing_count 2147483647
scoreboard players add fzsd.module.scoreboard.total.fishing_count fzsd.module.scoreboard.assign.general 1 scoreboard players add fzsd.module.scoreboard.total.fishing_count fzsd.module.scoreboard.assign.general 1
execute if score fzsd.module.scoreboard.total.fishing_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.fishing_count fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players add @s fzsd.module.scoreboard.display.kill_count 1 scoreboard players add @s fzsd.module.scoreboard.display.kill_count 1
execute if score @s fzsd.module.scoreboard.display.kill_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.kill_count 2147483647
scoreboard players add fzsd.module.scoreboard.total.kill_count fzsd.module.scoreboard.assign.general 1 scoreboard players add fzsd.module.scoreboard.total.kill_count fzsd.module.scoreboard.assign.general 1
execute if score fzsd.module.scoreboard.total.kill_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.kill_count fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players add @s fzsd.module.scoreboard.display.placement_count 1 scoreboard players add @s fzsd.module.scoreboard.display.placement_count 1
execute if score @s fzsd.module.scoreboard.display.placement_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.placement_count 2147483647
scoreboard players add fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general 1 scoreboard players add fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general 1
execute if score fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general 2147483647
@@ -1,2 +1,4 @@
scoreboard players add @s fzsd.module.scoreboard.display.trade_count 1 scoreboard players add @s fzsd.module.scoreboard.display.trade_count 1
execute if score @s fzsd.module.scoreboard.display.trade_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.trade_count 2147483647
scoreboard players add fzsd.module.scoreboard.total.trade_count fzsd.module.scoreboard.assign.general 1 scoreboard players add fzsd.module.scoreboard.total.trade_count fzsd.module.scoreboard.assign.general 1
execute if score fzsd.module.scoreboard.total.trade_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.trade_count fzsd.module.scoreboard.assign.general 2147483647
@@ -1,13 +1,18 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.activation
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.activation", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.activation
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.activation execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.activation
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.aviating_distance
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.aviating_distance", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.aviating_distance
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.aviating_distance execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.aviating_distance
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.damage_taken
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.damage_taken", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.damage_taken
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.damage_taken execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.damage_taken
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.death_count
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.death_count", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.death_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.death_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.death_count
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.dig_count
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.dig_count", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.dig_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.dig_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.dig_count
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.fishing_count
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.fishing_count", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.fishing_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.fishing_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.fishing_count
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.general
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.general", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.general
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.general execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.general
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.kill_count
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.kill_count", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.kill_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.kill_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.kill_count
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.placement_count
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.placement_count", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.placement_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.placement_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.placement_count
@@ -1,13 +1,17 @@
# 调用者:fzsd:module/scoreboard/carousel/try_display/~ # 调用者:fzsd:module/scoreboard/carousel/try_display/~
## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81 ## https://minecraft.fandom.com/zh/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.trade_count
###
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 if score fzsd.logger.level fzsd.variable.integer matches ..300 run tellraw @a [{"nbt": "fzsd.level.fine", "interpret": true, "storage": "fzsd:logger"}, {"text": "已为队伍"}, {"nbt": "fzsd.scoreboard.text.carousel", "interpret": true, "storage": "fzsd:module"}, {"text": "显示"}, {"nbt": "fzsd.scoreboard.text.trade_count", "interpret": true, "storage": "fzsd:module"}, {"text": "计分板"}]
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run return 6
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 0 run scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 1 run scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 2 run scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 3 run scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 4 run scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 5 run scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 6 run scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 7 run scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 8 run scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.trade_count
execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.trade_count execute if score fzsd.module.scoreboard.carousel.color fzsd.variable.integer matches 9 run scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.trade_count
@@ -2,4 +2,5 @@
scoreboard players set -1 fzsd.variable.integer -1 scoreboard players set -1 fzsd.variable.integer -1
scoreboard players set 10 fzsd.variable.integer 10 scoreboard players set 10 fzsd.variable.integer 10
scoreboard players set 200 fzsd.variable.integer 200 scoreboard players set 200 fzsd.variable.integer 200
scoreboard players set 24000 fzsd.variable.integer 24000
scoreboard players set 72000 fzsd.variable.integer 72000 scoreboard players set 72000 fzsd.variable.integer 72000
+17 -20
View File
@@ -1,5 +1,5 @@
{ {
"condition": "minecraft:alternative", "condition": "minecraft:any_of",
"terms": [ "terms": [
{ {
"__comment": "主手==斧子", "__comment": "主手==斧子",
@@ -15,11 +15,11 @@
}, },
{ {
"__comment": "主手!=工具&&副手==斧子", "__comment": "主手!=工具&&副手==斧子",
"condition": "minecraft:inverted", "condition": "minecraft:all_of",
"term": { "terms": [
"condition": "minecraft:alternative", {
"terms": [ "condition": "minecraft:inverted",
{ "term": {
"condition": "minecraft:entity_properties", "condition": "minecraft:entity_properties",
"entity": "this", "entity": "this",
"predicate": { "predicate": {
@@ -29,23 +29,20 @@
} }
} }
} }
}, }
{ },
"condition": "minecraft:inverted", {
"term": { "condition": "minecraft:entity_properties",
"condition": "minecraft:entity_properties", "entity": "this",
"entity": "this", "predicate": {
"predicate": { "equipment": {
"equipment": { "offhand": {
"offhand": { "tag": "fzsd:tool/axes"
"tag": "fzsd:tool/axes"
}
}
} }
} }
} }
] }
} ]
} }
] ]
} }
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"condition": "minecraft:alternative", "condition": "minecraft:any_of",
"terms": [ "terms": [
{ {
"condition": "minecraft:reference", "condition": "minecraft:reference",
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"condition": "minecraft:alternative", "condition": "minecraft:any_of",
"terms": [ "terms": [
{ {
"condition": "minecraft:entity_scores", "condition": "minecraft:entity_scores",
+7
View File
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"minecraft:water",
"minecraft:lava"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:api/get_current_daytime"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:api/get_current_gametime"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:api/get_time_since_rest"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:api/install"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:api/uninstall"
]
}
+3 -2
View File
@@ -2,7 +2,8 @@
"__comment": "本标签将强制重装所有模块", "__comment": "本标签将强制重装所有模块",
"replace": false, "replace": false,
"values": [ "values": [
"#fzsd:uninstall", "#fzsd:deep_uninstall",
"#fzsd:deep_install" "#fzsd:deep_install",
"#fzsd:load"
] ]
} }
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"#fzsd:module/phantom_warning/event/on_night"
]
}
@@ -1,6 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"fzsd:game_event/game/on_night/on_tick"
] ]
} }
@@ -1,6 +1,5 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"fzsd:game_event/callback/on_placed_liquid"
] ]
} }
@@ -1,7 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"fzsd:game_event/callback/on_placed_solid",
"#fzsd:module/scoreboard/assign/scoreboard/placement_count" "#fzsd:module/scoreboard/assign/scoreboard/placement_count"
] ]
} }
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
]
}
@@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"fzsd:module/join_message/default_message"
]
}
@@ -1,6 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"#fzsd:module/join_message/default_message" "fzsd:module/join_message/default_message"
] ]
} }
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:module/phantom_warning/check_time_since_rest"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:module/phantom_warning/event/on_night"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:module/phantom_warning/install"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:module/phantom_warning/send_phantom_warning"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fzsd:module/phantom_warning/uninstall"
]
}
+2 -1
View File
@@ -2,6 +2,7 @@
"replace": false, "replace": false,
"values": [ "values": [
"#fzsd:uninstall", "#fzsd:uninstall",
"#fzsd:install" "#fzsd:install",
"#fzsd:load"
] ]
} }
@@ -4,9 +4,11 @@
"#fzsd:module/health/install", "#fzsd:module/health/install",
"#fzsd:module/here/install", "#fzsd:module/here/install",
"#fzsd:module/interactor/install", "#fzsd:module/interactor/install",
"#fzsd:module/join_message/install",
"#fzsd:module/last_death/install", "#fzsd:module/last_death/install",
"#fzsd:module/last_nether_portal/install", "#fzsd:module/last_nether_portal/install",
"#fzsd:module/last_spawn_point/install", "#fzsd:module/last_spawn_point/install",
"#fzsd:module/phantom_warning/install",
"#fzsd:module/scoreboard/install", "#fzsd:module/scoreboard/install",
"#fzsd:module/sweeper/install" "#fzsd:module/sweeper/install"
] ]
@@ -8,6 +8,7 @@
"fzsd:module/last_death/try_install", "fzsd:module/last_death/try_install",
"fzsd:module/last_nether_portal/try_install", "fzsd:module/last_nether_portal/try_install",
"fzsd:module/last_spawn_point/try_install", "fzsd:module/last_spawn_point/try_install",
"fzsd:module/phantom_warning/try_install",
"fzsd:module/scoreboard/try_install", "fzsd:module/scoreboard/try_install",
"fzsd:module/sweeper/try_install" "fzsd:module/sweeper/try_install"
] ]
@@ -3,6 +3,7 @@
"values": [ "values": [
"fzsd:system/install/install", "fzsd:system/install/install",
"#fzsd:logger/install", "#fzsd:logger/install",
"#fzsd:api/install",
"#fzsd:game_event/install" "#fzsd:game_event/install"
] ]
} }
@@ -1,6 +1,7 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"#fzsd:api/uninstall",
"#fzsd:game_event/uninstall", "#fzsd:game_event/uninstall",
"#fzsd:logger/uninstall", "#fzsd:logger/uninstall",
"fzsd:system/uninstall/uninstall" "fzsd:system/uninstall/uninstall"
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"pack": { "pack": {
"description": "FZ Survival Datapack 3.0 | Author: Harvey_Husky", "description": "FZ Survival Datapack 3.1 | Author: Harvey_Husky",
"pack_format": 10 "pack_format": 15
} }
} }
+64 -81
View File
@@ -19,41 +19,11 @@ require_not_null(value) -> (
); );
require_version(requirement) -> ( require_version(requirement) -> (
req_0 = slice(requirement, 0, 1); req_ver = split('\\.', requirement);
req_1 = slice(requirement, 1, 2); cur_ver = split('\\.', global_carpet_version);
if(req_0 == '>', return(number(cur_ver:0) >= number(req_ver:0)
if(req_1 == '=', && number(cur_ver:1) >= number(req_ver:1)
req_ver = split('>=|\\.', requirement); && number(cur_ver:2) >= number(req_ver:2));
print(player('all'), req_ver);
cur_ver = split('\\.', global_carpet_version);
return(number(req_ver:1) >= number(cur_ver:0)
&& number(req_ver:2) >= number(cur_ver:1)
&& number(req_ver:3) >= number(cur_ver:2));
);
req_ver = split('>|\\.', requirement);
print(player('all'), req_ver);
cur_ver = split('\\.', global_carpet_version);
return(number(req_ver:1) > number(cur_ver:0)
&& number(req_ver:2) > number(cur_ver:1)
&& number(req_ver:3) > number(cur_ver:2));
);
if(req_0 == '<',
if(req_1 == '=',
req_ver = split('<=|\\.', requirement);
print(player('all'), req_ver);
cur_ver = split('\\.', global_carpet_version);
return(number(req_ver:1) <= number(cur_ver:0)
&& number(req_ver:2) <= number(cur_ver:1)
&& number(req_ver:3) <= number(cur_ver:2));
);
req_ver = split('<|\\.', requirement);
print(player('all'), req_ver);
cur_ver = split('\\.', global_carpet_version);
return(number(req_ver:1) < number(cur_ver:0)
&& number(req_ver:2) < number(cur_ver:1)
&& number(req_ver:3) < number(cur_ver:2));
);
return(false);
); );
//** 主要逻辑 **// //** 主要逻辑 **//
@@ -145,22 +115,7 @@ __config() -> {
}; };
__on_start() -> ( __on_start() -> (
// 读取配置文件 reload_configs();
global_config = read_file('config', 'json');
if(global_config == null, // carpet 1.4.69 兼容
global_config = {};
);
if(length(global_config) == 0, // 读取失败或不存在
delete_file('config', 'json'); // 避免一些意外的问题
global_config:'config_version' = '1.0.0'; // 占位用无实际作用
if(require_version('>=1.99.99'), // 等待新功能支持
global_config:'allow_spawn_whitelist_player' = false;
write_file('config', 'json', global_config);
,
// else
write_file('config', 'json', global_config);
);
);
global_team_cache = read_file('team_cache', 'json'); global_team_cache = read_file('team_cache', 'json');
if(global_team_cache == null, // carpet 1.4.69 兼容 if(global_team_cache == null, // carpet 1.4.69 兼容
global_team_cache = {}; global_team_cache = {};
@@ -173,12 +128,14 @@ __on_close() -> (
write_file('team_cache', 'json', global_team_cache); write_file('team_cache', 'json', global_team_cache);
); );
if(require_version('>=1.99.99'), // 等待新功能支持 if(require_version('1.4.112'), // 新功能支持
__on_player_command(player, message) -> ( __on_player_command(player, command) -> (
print(player('all'), 'command!'); l = length(command);
if(length(message) > 7 if(l > 13
&& slice(message, 0, 7) == '/player' && slice(command, 0, 6) == 'player'
&& !(global_config:'allow_spawn_whitelist_player'), && slice(command, l - 5, l) == 'spawn'
&& !(global_config:'allow_spawn_whitelist_player')
&& contains(get_server_whitelist(), slice(command, 7, l - 6)),
return('cancel'); return('cancel');
); );
); );
@@ -186,11 +143,11 @@ if(require_version('>=1.99.99'), // 等待新功能支持
__on_player_connects(player) -> ( __on_player_connects(player) -> (
player_type = player ~ 'player_type'; player_type = player ~ 'player_type';
player_team = player ~ 'team';
player_name = player ~ 'name';
if(player_type == 'fake', if(player_type == 'fake',
( (
player_team = player ~ 'team';
if(player_team != 'fzsd.module.scoreboard.fake', if(player_team != 'fzsd.module.scoreboard.fake',
player_name = player ~ 'name';
global_team_cache:player_name = player_team; global_team_cache:player_name = player_team;
); );
team_add('fzsd.module.scoreboard.fake', player); team_add('fzsd.module.scoreboard.fake', player);
@@ -198,7 +155,9 @@ __on_player_connects(player) -> (
), ),
player_type == 'shadow', player_type == 'shadow',
( (
player_team = player ~ 'team';
if(player_team != 'fzsd.module.scoreboard.shadow', if(player_team != 'fzsd.module.scoreboard.shadow',
player_name = player ~ 'name';
global_team_cache:player_name = player_team; global_team_cache:player_name = player_team;
); );
team_add('fzsd.module.scoreboard.shadow', player); team_add('fzsd.module.scoreboard.shadow', player);
@@ -222,6 +181,35 @@ __on_player_disconnects(player, reason) -> (
try_restore_team_from_cache(player); try_restore_team_from_cache(player);
); );
// 获取服务器白名单
get_server_whitelist() -> (
return(keys(system_info('server_whitelist')));
);
// 重载配置文件
reload_configs() -> (
// 读取配置文件
global_config = read_file('config', 'json');
if(global_config == null, // carpet 1.4.69 兼容
global_config = {};
);
config_changed = false;
// 读取失败或不存在
if(length(global_config) == 0,
global_config:'config_version' = '1.0.0'; // 占位用无实际作用
config_changed = true;
);
// 新功能支持
if(require_version('1.4.112') && !contains(global_config, 'allow_spawn_whitelist_player'),
global_config:'allow_spawn_whitelist_player' = false;
config_changed = true;
);
if(config_changed == true,
delete_file('config', 'json'); // 避免一些意外的问题
write_file('config', 'json', global_config);
);
);
// 获取所有计分板下的所有玩家列表 // 获取所有计分板下的所有玩家列表
get_scoreboard_player_list() -> ( get_scoreboard_player_list() -> (
set = m(); set = m();
@@ -395,20 +383,14 @@ merge_score(from, to, fzsd_version) -> (
// 获取承载总榜数据的玩家名 // 获取承载总榜数据的玩家名
// 因为新计分板允许玩家自定义显示的总榜名称故做复杂判断才能使脚本确定用来承载总榜数据的玩家名 // 因为新计分板允许玩家自定义显示的总榜名称故做复杂判断才能使脚本确定用来承载总榜数据的玩家名
get_total_score_name_new(scoreboard) -> ( get_total_score_name_new(scoreboard) -> (
INT_MIN = -2147483648; // 系统总榜id
// 获取系统总榜id sys_total_name = replace(scoreboard, 'display', 'total');
system_total_name = replace(scoreboard, 'display', 'total');
// 当前总分
current_score = scoreboard('fzsd.module.scoreboard.assign.general', sys_total_name);
// 将系统总榜分数加上最小int值使其成为最低分 // 将系统总榜分数设为INT_MIN使其成为最低分
scoreboard( scoreboard('fzsd.module.scoreboard.assign.general', sys_total_name, -2147483648);
'fzsd.module.scoreboard.assign.general',
system_total_name,
scoreboard(
'fzsd.module.scoreboard.assign.general',
system_total_name
) + INT_MIN
);
// 将总分赋值到显示计分板上 // 将总分赋值到显示计分板上
display_total_score(scoreboard); display_total_score(scoreboard);
@@ -427,14 +409,7 @@ get_total_score_name_new(scoreboard) -> (
); );
// 恢复总榜分数 // 恢复总榜分数
scoreboard( scoreboard('fzsd.module.scoreboard.assign.general', sys_total_name, current_score);
'fzsd.module.scoreboard.assign.general',
system_total_name,
scoreboard(
'fzsd.module.scoreboard.assign.general',
system_total_name
) - INT_MIN
);
display_total_score(scoreboard); display_total_score(scoreboard);
// 返回榜内最低分的玩家名承载总榜数据的玩家名 // 返回榜内最低分的玩家名承载总榜数据的玩家名
@@ -452,7 +427,15 @@ command_recalculate_total_score(scoreboard) -> (
total_score = 0; total_score = 0;
for(scoreboard(scoreboard), for(scoreboard(scoreboard),
if(_ != total_score_name_new, if(_ != total_score_name_new,
total_score += scoreboard(scoreboard, _); current_player_score = scoreboard(scoreboard, _);
if(current_player_score < 0, // 避免溢出
current_player_score = 2147483647;
scoreboard(scoreboard, _, 2147483647);
);
total_score += current_player_score;
);
if(total_score < 0, // 避免溢出
total_score = 2147483647;
); );
); );
// 赋值总分到系统总分计分板 // 赋值总分到系统总分计分板
@@ -529,7 +512,7 @@ restore_score(player_name, scoreboard) -> (
require_not_null(player_name); require_not_null(player_name);
if(scoreboard == null, if(scoreboard == null,
for(global_current_scoreboard_list, restore_score(player_name, _)); for(global_current_scoreboard_list, restore_score(player_name, _));
return(); return(true);
); );
player = player(player_name); player = player(player_name);
player_is_offline = false; player_is_offline = false;