Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09fcbb7891 | |||
| e13ab7619c | |||
| cfbd6da92a | |||
| b3582c3bab | |||
| 2a96a9ee3a | |||
| 4e79e3209e | |||
| 09fac1082a | |||
| 44d7a24b1b | |||
| 667822c436 | |||
| 02330aec55 |
@@ -23,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.1
|
||||||
|
|
||||||
[](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [](https://minecraft.net/)
|
[](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [](https://minecraft.net/)
|
||||||
|
|
||||||
> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
|
> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
|
||||||
|
|
||||||
@@ -60,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 |
|
||||||
|
|
||||||
### 地毯脚本
|
### 地毯脚本
|
||||||
|
|
||||||
@@ -85,6 +99,9 @@
|
|||||||
- *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全*
|
- *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全*
|
||||||
- `commandPlayer <permissionType>`:设置player命令权限类型
|
- `commandPlayer <permissionType>`:设置player命令权限类型
|
||||||
|
|
||||||
|
### 幻翼预警
|
||||||
|
- 首次使用需要先睡一觉
|
||||||
|
|
||||||
### 管理员
|
### 管理员
|
||||||
|
|
||||||
- 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块
|
- 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块
|
||||||
@@ -94,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"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"}]
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
execute store success storage fzsd:version fzsd.need_update int 1 run data merge storage fzsd:version {fzsd: {version: '3.1.0.rc.1'}}
|
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,5 +1,8 @@
|
|||||||
# 调用者:advancements/fzsd:~
|
# 调用者: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
|
function #fzsd:game_event/player/on_placed_liquid
|
||||||
|
|
||||||
## 重置事件进度
|
## 重置事件进度
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# 调用者:advancements/fzsd:~
|
# 调用者: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
|
function #fzsd:game_event/player/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
|
||||||
@@ -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
|
||||||
@@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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,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"
|
||||||
|
|||||||
+18
-27
@@ -43,7 +43,6 @@ global_current_scoreboard_list = [
|
|||||||
'fzsd.module.scoreboard.display.aviating_distance',
|
'fzsd.module.scoreboard.display.aviating_distance',
|
||||||
'fzsd.module.scoreboard.display.placement_count'
|
'fzsd.module.scoreboard.display.placement_count'
|
||||||
];
|
];
|
||||||
global_server_whitelist_cache = null;
|
|
||||||
|
|
||||||
__config() -> {
|
__config() -> {
|
||||||
'scope' -> 'global',
|
'scope' -> 'global',
|
||||||
@@ -184,10 +183,7 @@ __on_player_disconnects(player, reason) -> (
|
|||||||
|
|
||||||
// 获取服务器白名单
|
// 获取服务器白名单
|
||||||
get_server_whitelist() -> (
|
get_server_whitelist() -> (
|
||||||
if(global_server_whitelist_cache == null,
|
return(keys(system_info('server_whitelist')));
|
||||||
global_server_whitelist_cache = keys(system_info('server_whitelist'));
|
|
||||||
);
|
|
||||||
return(global_server_whitelist_cache);
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// 重载配置文件
|
// 重载配置文件
|
||||||
@@ -387,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);
|
||||||
@@ -419,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);
|
||||||
|
|
||||||
// 返回榜内最低分的玩家名(承载总榜数据的玩家名)
|
// 返回榜内最低分的玩家名(承载总榜数据的玩家名)
|
||||||
@@ -444,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;
|
||||||
);
|
);
|
||||||
);
|
);
|
||||||
// 赋值总分到系统总分计分板
|
// 赋值总分到系统总分计分板
|
||||||
@@ -521,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;
|
||||||
|
|||||||
Reference in New Issue
Block a user