Compare commits
32 Commits
v3.1.1.rc.1
...
v3.1.7
| Author | SHA1 | Date | |
|---|---|---|---|
| 218b24b4a4 | |||
| 56b2a16634 | |||
| fd706b77bc | |||
| 39711d3e01 | |||
| 51c667c392 | |||
| 48a2fd7cb5 | |||
| 0b41cddbf8 | |||
| 52f182a02f | |||
| 78451c559e | |||
| 0fa1c6ae32 | |||
| f2d84334fe | |||
| f3cee3baef | |||
| 63efa94335 | |||
| 6e8a38d027 | |||
| 888d664897 | |||
| c46c3d0ec2 | |||
| b398e27d89 | |||
| 14f7fdc70c | |||
| 664735720f | |||
| 697957300b | |||
| 1c9f10261a | |||
| a3642694e8 | |||
| f2226d6c0e | |||
| 0c09cd467f | |||
| 4cd45d6ab1 | |||
| 3499fb0be3 | |||
| 0c93ee830c | |||
| 09fcbb7891 | |||
| e13ab7619c | |||
| cfbd6da92a | |||
| b3582c3bab | |||
| 2a96a9ee3a |
Vendored
+2
-2
@@ -17,6 +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.20",
|
"datapack.env.cmdVersion": "1.20.2",
|
||||||
"datapack.env.dataVersion": "1.20"
|
"datapack.env.dataVersion": "1.20.4"
|
||||||
}
|
}
|
||||||
@@ -2,31 +2,21 @@
|
|||||||
|
|
||||||
为FZ服务器写的Minecraft生存辅助数据包
|
为FZ服务器写的Minecraft生存辅助数据包
|
||||||
|
|
||||||
#### @Author: Harvey_Husky
|
|
||||||
|
|
||||||
#### Copyright (C) 2019-2023 Harvey_Husky
|
|
||||||
|
|
||||||
[Bilibili专栏](https://www.bilibili.com/read/cv4267319)(年久失修)
|
|
||||||
|
|
||||||
## 安装教程
|
## 安装教程
|
||||||
|
|
||||||
1. 兼容性
|
1. 兼容性
|
||||||
- `数据包 v3.1.x` 支持 `Minecraft 1.20.x`
|
- `数据包 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.1.x` 支持 `Minecraft 1.17.x-1.18.x`
|
|
||||||
- `数据包 v2.0.x` 支持 `Minecraft 1.16.3-1.16.5`
|
|
||||||
2. 前往[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)下载对应MC版本的数据包
|
2. 前往[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)下载对应MC版本的数据包
|
||||||
3. 从zip文件的 `scripts` 目录中挑选你需要的 `.sc` 文件
|
3. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
||||||
4. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
4. (可选)下载并安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases)
|
||||||
5. (可选)下载并安装 [Carpet Mod **1.4.24**](https://github.com/gnembon/fabric-carpet/releases) 或以上版本
|
5. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||||
6. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
- **注意:如果未正确安装该脚本,数据包会强制禁用 carpet mod 的 `player` 命令以避免假人污染记分板,需要在安装好脚本后手动启用 `player` 命令**
|
||||||
7. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`)
|
6. 执行 `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)
|
||||||
|
|
||||||
@@ -40,18 +30,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后,使用连点器破基岩,破基岩榜将自动显示在交互器页面
|
||||||
@@ -60,17 +50,32 @@
|
|||||||
| :------: | :----------------------------------------------: |
|
| :------: | :----------------------------------------------: |
|
||||||
| 破基岩榜 |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 |
|
||||||
|
|
||||||
### 地毯脚本
|
### 地毯脚本
|
||||||
|
|
||||||
- 如果你不知道 Carpet Mod 或 Carpet 脚本,请忽略本节
|
- 如果你不知道 Carpet Mod 或 Carpet 脚本,请忽略本节
|
||||||
- 需要安装 [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` )
|
||||||
|
- **注意:如果未正确安装该脚本,数据包会强制禁用 carpet mod 的 `player` 命令以避免假人污染记分板,需要在安装好脚本后手动启用 `player` 命令**
|
||||||
- 脚本:
|
- 脚本:
|
||||||
- `fzsd_score.sc`:
|
- `fzsd_score.sc`:
|
||||||
- 可避免Carpet假人污染计分板
|
- 可避免Carpet假人污染计分板
|
||||||
- 可以标记哪些玩家是假人
|
- 可以标记哪些玩家是假人
|
||||||
- *注:请不要使用为假人名添加“bot”前缀的carpet扩展,本插件不支持此类假人!*
|
|
||||||
- 子命令( `/fzsd_score <子命令>` ):
|
- 子命令( `/fzsd_score <子命令>` ):
|
||||||
- `updateFrom <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!)
|
- `updateFrom <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!)
|
||||||
- `recalculate`:重新计算所有计分板总分
|
- `recalculate`:重新计算所有计分板总分
|
||||||
@@ -85,13 +90,21 @@
|
|||||||
- *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全*
|
- *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全*
|
||||||
- `commandPlayer <permissionType>`:设置player命令权限类型
|
- `commandPlayer <permissionType>`:设置player命令权限类型
|
||||||
|
|
||||||
|
### 幻翼预警
|
||||||
|
- 首次使用需要先睡一觉
|
||||||
|
|
||||||
### 管理员
|
### 管理员
|
||||||
|
|
||||||
- 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块
|
- 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块
|
||||||
|
|
||||||
### 其他
|
### 其他
|
||||||
|
|
||||||
- 见游戏内交互器按钮
|
- 扫地机
|
||||||
|
- 获取当前维度和坐标(以及对应的主世界、下界坐标)(私信/广播)
|
||||||
|
- 获取上次死亡维度和坐标(私信)
|
||||||
|
- 获取上次穿出的下界传送门坐标(私信/广播)
|
||||||
|
- 获取上个重生点维度和坐标(私信)
|
||||||
|
|
||||||
## 开发者相关
|
## 开发者相关
|
||||||
- 参见[开发文档](/DEVDOC.md)
|
|
||||||
|
- 见[开发文档](/DEVDOC.md)
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name fzsd.module.health
|
||||||
|
execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name
|
||||||
|
execute unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health
|
||||||
|
execute if data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list
|
||||||
|
|
||||||
|
## 日志
|
||||||
|
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已加载组件:玩家血量显示"}]
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b
|
data modify storage fzsd:config fzsd.module.health.display.below_name set value 0b
|
||||||
function #fzsd:module/health/try_load
|
function fzsd:module/health/try_load
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b
|
data modify storage fzsd:config fzsd.module.health.display.below_name set value 1b
|
||||||
function #fzsd:module/health/try_load
|
function fzsd:module/health/try_load
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
data modify storage fzsd:config fzsd.module.health.display.list set value 0b
|
data modify storage fzsd:config fzsd.module.health.display.list set value 0b
|
||||||
function #fzsd:module/health/try_load
|
function fzsd:module/health/try_load
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
data modify storage fzsd:config fzsd.module.health.display.list set value 1b
|
data modify storage fzsd:config fzsd.module.health.display.list set value 1b
|
||||||
function #fzsd:module/health/try_load
|
function fzsd:module/health/try_load
|
||||||
@@ -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"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.1.rc.1'}}
|
execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.7'}}
|
||||||
execute if data storage fzsd:version fzsd{need_update: 1b} 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# 调用者:advancements/fzsd:~
|
# 调用者:advancements/fzsd:~
|
||||||
|
|
||||||
execute if predicate fzsd:is_real_player run function fzsd:game_event/player/on_login
|
scoreboard players set @s fzsd.event.leave_game 0
|
||||||
|
execute if predicate fzsd:is_real_player if score @s fzsd.event.leave_game matches 0 run function fzsd:game_event/player/on_login
|
||||||
|
|
||||||
## 重制所有触发器、事件进度
|
## 重制所有触发器、事件进度
|
||||||
scoreboard players set @s fzsd.event.leave_game 0
|
|
||||||
function #fzsd:game_event/reset_all
|
function #fzsd:game_event/reset_all
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
## 调试
|
## 调试
|
||||||
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": "使用了工具"}]
|
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_used_tool
|
function #fzsd:game_event/player/on_used_tool
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
## @see compat_16
|
||||||
execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fzsd.module.health
|
execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fzsd.module.health
|
||||||
execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName
|
execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName
|
||||||
execute unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health
|
execute unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ execute store result storage fzsd:here fzsd.nether.x int 0.125 run data get enti
|
|||||||
execute store result storage fzsd:here fzsd.nether.z int 0.125 run data get entity @s Pos[2]
|
execute store result storage fzsd:here fzsd.nether.z int 0.125 run data get entity @s Pos[2]
|
||||||
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:the_nether"
|
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:the_nether"
|
||||||
function #fzsd:api/get_dimension_name
|
function #fzsd:api/get_dimension_name
|
||||||
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.nether.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.nether.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.nether.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.nether.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||||
@@ -3,5 +3,5 @@ execute store result storage fzsd:here fzsd.overworld.x int 8 run data get entit
|
|||||||
execute store result storage fzsd:here fzsd.overworld.z int 8 run data get entity @s Pos[2]
|
execute store result storage fzsd:here fzsd.overworld.z int 8 run data get entity @s Pos[2]
|
||||||
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld"
|
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld"
|
||||||
function #fzsd:api/get_dimension_name
|
function #fzsd:api/get_dimension_name
|
||||||
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.overworld.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.overworld.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
data modify storage fzsd:here fzsd.message.append set value '[{"text": ",对应", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.overworld.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.overworld.z", "storage": "fzsd:here"}, {"text": "]"}]]'
|
||||||
## 恢复用于判断的维度id
|
## 恢复用于判断的维度id
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# 本目录用于存放向事件中注册的函数,并不用来新建事件
|
# 本目录用于存放向事件中注册的函数,并不用来新建事件
|
||||||
|
|
||||||
execute if data storage fzsd:install fzsd.module{interactor: 1b} unless score @s fzsd.module.interactor.player.config matches -1 if entity @s[x_rotation = -90] run function #fzsd:module/interactor/event/on_start_interact
|
execute if data storage fzsd:install fzsd.module{interactor: 1b} if entity @s[tag=!fzsd.ignore_interactor_headup_sneak, x_rotation = -90] run function #fzsd:module/interactor/event/on_start_interact
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
## 调试
|
## 调试
|
||||||
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": "显示交互器"}]
|
||||||
|
|
||||||
execute if data storage fzsd:installed fzsd.module{last_death:1b} run tellraw @s {"text": "交互器打开方式:"}
|
execute if data storage fzsd:install fzsd.module{interactor:1b} run tellraw @s {"text": "交互器:"}
|
||||||
|
|
||||||
execute if data storage fzsd:installed fzsd.module{last_death:1b} unless score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 900"}},{"text": "已开启", "color": "green"},{"text": "]"}]]
|
execute if data storage fzsd:install fzsd.module{interactor:1b} if entity @s[tag=!fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"text": "- 打开方式“抬头+蹲起”:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 900"}},{"text": "已启用", "color": "green"},{"text": "]"}]]
|
||||||
execute if data storage fzsd:installed fzsd.module{last_death:1b} if score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击开启"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]]
|
execute if data storage fzsd:install fzsd.module{interactor:1b} if entity @s[tag=fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"text": "- 打开方式“抬头+蹲起”:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]]
|
||||||
@@ -3,6 +3,5 @@
|
|||||||
## 调试
|
## 调试
|
||||||
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": "的交互器分数为:"}, {"score": {"name": "@s", "objective": "fzsd.module.interactor.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": "的交互器分数为:"}, {"score": {"name": "@s", "objective": "fzsd.module.interactor.trigger"}}]
|
||||||
|
|
||||||
execute if score @s fzsd.module.interactor.trigger matches 900 run scoreboard players set @s fzsd.module.interactor.player.config -1
|
execute if score @s fzsd.module.interactor.trigger matches 900 run tag @s add fzsd.ignore_interactor_headup_sneak
|
||||||
|
execute if score @s fzsd.module.interactor.trigger matches 910 run tag @s remove fzsd.ignore_interactor_headup_sneak
|
||||||
execute if score @s fzsd.module.interactor.trigger matches 910 run scoreboard players set @s fzsd.module.interactor.player.config 0
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "本服务器启用了"}, {"text": "FZ生存数据包", "color": "gold", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击前往数据包gitee主页"}}, "clickEvent": {"action": "open_url", "value": "https://gitee.com/harvey-husky/fz-survival-datapack"}}]]
|
tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "本服务器启用了"}, {"text": "FZ生存数据包", "color": "gold", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击前往数据包gitee主页"}}, "clickEvent": {"action": "open_url", "value": "https://gitee.com/harvey-husky/fz-survival-datapack"}}]]
|
||||||
## 如果玩家未关闭抬头蹲起功能
|
## 如果玩家未关闭抬头蹲起功能
|
||||||
execute unless score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "抬头90°并蹲起,或使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]]
|
execute if entity @s[tag=!fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "抬头90°并蹲起,或使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]]
|
||||||
## 如果玩家关闭了抬头蹲起功能
|
## 如果玩家关闭了抬头蹲起功能
|
||||||
execute if score @s fzsd.module.interactor.player.config matches -1 run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]]
|
execute if entity @s[tag=fzsd.ignore_interactor_headup_sneak] run tellraw @s [{"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, [{"text": "使用", "color": "white"}, {"text": "/trigger fzsd.module.interactor.trigger", "color": "aqua", "underlined": true, "hoverEvent": {"action": "show_text", "contents": {"text": "点击填入聊天栏"}}, "clickEvent": {"action": "suggest_command", "value": "/trigger fzsd.module.interactor.trigger"}}, {"text": "打开交互器"}]]
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
# TODO: 数字有待商榷
|
# TODO: 数字有待商榷
|
||||||
|
## @s this player
|
||||||
function #fzsd:api/get_time_since_rest
|
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
|
execute if score fzsd.var.cache fzsd.variable.integer matches 61766.. if entity @s[tag=!fzsd.ignore_phantom_warning] run function #fzsd:module/phantom_warning/send_phantom_warning
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
execute if data storage fzsd:install fzsd.module{phantom_warning:1b} run function fzsd:module/phantom_warning/interactor/display_0
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
tellraw @s[tag=!fzsd.ignore_phantom_warning] [{"text": "幻翼预警:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 4000"}}, {"text": "已启用", "color": "green"}, {"text": "]", "color": "gray"}]]
|
||||||
|
tellraw @s[tag=fzsd.ignore_phantom_warning] [{"text": "幻翼预警:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 4001"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
execute if score @s fzsd.module.interactor.trigger matches 4000 run tag @s add fzsd.ignore_phantom_warning
|
||||||
|
execute if score @s fzsd.module.interactor.trigger matches 4001 run tag @s remove fzsd.ignore_phantom_warning
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# 调用者:tags\functions\module\phantom_warning\send_phantom_warning.json
|
||||||
## 对当前玩家发送提醒
|
## 对当前玩家发送提醒
|
||||||
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 ..600 run tellraw @s [{"nbt": "fzsd.level.alert", "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,12 +1,12 @@
|
|||||||
tellraw @s [{"text": "扫地机:"}]
|
tellraw @s [{"text": "扫地机:"}]
|
||||||
|
|
||||||
tellraw @s[tag=!fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3400"}}, {"text": "已开启", "color": "green"}, {"text": "]", "color": "gray"}]]
|
tellraw @s[tag=!fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3400"}}, {"text": "已启用", "color": "green"}, {"text": "]", "color": "gray"}]]
|
||||||
tellraw @s[tag=fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3401"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
|
tellraw @s[tag=fzsd.ignore_sweeper_bossbar] [{"text": "- 血条栏:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3401"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
|
||||||
|
|
||||||
tellraw @s[tag=!fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3500"}}, {"text": "已开启", "color": "green"}, {"text": "]", "color": "gray"}]]
|
tellraw @s[tag=!fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3500"}}, {"text": "已启用", "color": "green"}, {"text": "]", "color": "gray"}]]
|
||||||
tellraw @s[tag=fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3501"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
|
tellraw @s[tag=fzsd.ignore_sweeper_sound] [{"text": "- 音效:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3501"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
|
||||||
|
|
||||||
tellraw @s[tag=!fzsd.ignore_sweeper_message] [{"text": "- 消息:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3600"}}, {"text": "已开启", "color": "green"}, {"text": "]", "color": "gray"}]]
|
tellraw @s[tag=!fzsd.ignore_sweeper_message] [{"text": "- 聊天栏:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3600"}}, {"text": "已启用", "color": "green"}, {"text": "]", "color": "gray"}]]
|
||||||
tellraw @s[tag=fzsd.ignore_sweeper_message] [{"text": "- 消息:"}, [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3601"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
|
tellraw @s[tag=fzsd.ignore_sweeper_message] [{"text": "- 聊天栏:"}, [{"text": "[", "color": "gray", "hoverEvent": {"action": "show_text", "value": "点击启用"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set 3601"}}, {"text": "已关闭", "color": "red"}, {"text": "]", "color": "gray"}]]
|
||||||
|
|
||||||
tellraw @s [{"text": "- 开关:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "关", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3000"}}, {"text": "关", "color": "red"}, {"text": "]"}], [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3300"}}, {"text": "清理一次", "color": "aqua"}, {"text": "]", "color": "gray"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "10s", "color": "#aa0000"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3010"}}, {"text": "10s", "color": "#aa0000"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "30s", "color": "#da7924"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3030"}}, {"text": "30s", "color": "#da7924"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "1min", "color": "#ffe34c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3060"}}, {"text": "1min", "color": "#ffe34c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "2min", "color": "#e3ff50"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3120"}}, {"text": "2min", "color": "#e3ff50"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "3min", "color": "#81d42c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3180"}}, {"text": "3min", "color": "#81d42c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "4min", "color": "#00aa00"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3240"}}, {"text": "4min", "color": "#00aa00"}, {"text": "]"}]]
|
tellraw @s [{"text": "- 开关:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "关", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3000"}}, {"text": "关", "color": "red"}, {"text": "]"}], [{"text": "[", "color": "gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3300"}}, {"text": "清理一次", "color": "aqua"}, {"text": "]", "color": "gray"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "10s", "color": "#aa0000"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3010"}}, {"text": "10s", "color": "#aa0000"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "30s", "color": "#da7924"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3030"}}, {"text": "30s", "color": "#da7924"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "1min", "color": "#ffe34c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3060"}}, {"text": "1min", "color": "#ffe34c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "2min", "color": "#e3ff50"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3120"}}, {"text": "2min", "color": "#e3ff50"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "3min", "color": "#81d42c"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3180"}}, {"text": "3min", "color": "#81d42c"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"text": "4min", "color": "#00aa00"}}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -3240"}}, {"text": "4min", "color": "#00aa00"}, {"text": "]"}]]
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# 这个文件并不会自动执行,有需要可以手动执行
|
||||||
carpet setDefault language zh_cn
|
carpet setDefault language zh_cn
|
||||||
carpet setDefault stackableShulkerBoxes 16
|
carpet setDefault stackableShulkerBoxes 16
|
||||||
carpet setDefault leadFix true
|
carpet setDefault leadFix true
|
||||||
|
|||||||
@@ -1,2 +1,7 @@
|
|||||||
## 整数类型
|
## 整数类型
|
||||||
scoreboard objectives add fzsd.variable.integer dummy
|
scoreboard objectives add fzsd.variable.integer dummy
|
||||||
|
scoreboard players set -1 fzsd.variable.integer -1
|
||||||
|
scoreboard players set 10 fzsd.variable.integer 10
|
||||||
|
scoreboard players set 200 fzsd.variable.integer 200
|
||||||
|
scoreboard players set 24000 fzsd.variable.integer 24000
|
||||||
|
scoreboard players set 72000 fzsd.variable.integer 72000
|
||||||
@@ -1,7 +1,96 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:any_of",
|
||||||
"entity": "this",
|
"terms": [
|
||||||
"predicate": {
|
{
|
||||||
"nbt": "{Item:{id:\"minecraft:minecart\"}}"
|
"condition": "minecraft:entity_properties",
|
||||||
}
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:minecart\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:hopper_minecart\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:chest_minecart\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:furnace_minecart\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:oak_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:birch_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:acacia_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:cherry_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:jungle_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:spruce_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:dark_oak_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:mangrove_boat\"}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"nbt": "{Item:{id:\"minecraft:bamboo_raft\"}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,10 @@
|
|||||||
"minecraft:stripped_spruce_log",
|
"minecraft:stripped_spruce_log",
|
||||||
"minecraft:stripped_spruce_wood",
|
"minecraft:stripped_spruce_wood",
|
||||||
"minecraft:stripped_warped_hyphae",
|
"minecraft:stripped_warped_hyphae",
|
||||||
"minecraft:stripped_warped_stem"
|
"minecraft:stripped_warped_stem",
|
||||||
|
"minecraft:stripped_cherry_log",
|
||||||
|
"minecraft:stripped_cherry_wood",
|
||||||
|
"minecraft:stripped_mangrove_log",
|
||||||
|
"minecraft:stripped_mangrove_wood"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
"#fzsd:module/last_death/interactor/on_click",
|
"#fzsd:module/last_death/interactor/on_click",
|
||||||
"#fzsd:module/last_nether_portal/interactor/on_click",
|
"#fzsd:module/last_nether_portal/interactor/on_click",
|
||||||
"#fzsd:module/last_spawn_point/interactor/on_click",
|
"#fzsd:module/last_spawn_point/interactor/on_click",
|
||||||
"#fzsd:module/sweeper/interactor/on_click"
|
"#fzsd:module/sweeper/interactor/on_click",
|
||||||
|
"#fzsd:module/phantom_warning/interactor/on_click"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
"#fzsd:module/last_death/interactor/display",
|
"#fzsd:module/last_death/interactor/display",
|
||||||
"#fzsd:module/last_nether_portal/interactor/display",
|
"#fzsd:module/last_nether_portal/interactor/display",
|
||||||
"#fzsd:module/last_spawn_point/interactor/display",
|
"#fzsd:module/last_spawn_point/interactor/display",
|
||||||
"#fzsd:module/sweeper/interactor/display"
|
"#fzsd:module/sweeper/interactor/display",
|
||||||
|
"#fzsd:module/phantom_warning/interactor/display"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -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/interactor/display"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fzsd:module/phantom_warning/interactor/on_click"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"replace": false,
|
"replace": false,
|
||||||
|
"__comment": "调用者:data/fzsd/functions/module/phantom_warning/check_time_since_rest.mcfunction",
|
||||||
"values": [
|
"values": [
|
||||||
"fzsd:module/phantom_warning/send_phantom_warning"
|
"fzsd:module/phantom_warning/send_phantom_warning"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"fzsd:module/sweeper/clear",
|
"fzsd:module/sweeper/clear",
|
||||||
"fzsd:module/sweeper/post_loop",
|
"fzsd:module/sweeper/pre_loop",
|
||||||
"fzsd:module/sweeper/start_timer",
|
"fzsd:module/sweeper/start_timer",
|
||||||
"fzsd:module/sweeper/bossbar"
|
"fzsd:module/sweeper/bossbar"
|
||||||
]
|
]
|
||||||
|
|||||||
+16
-1
@@ -1,6 +1,21 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"description": "FZ Survival Datapack 3.1 | Author: Harvey_Husky",
|
"description": "FZ Survival Datapack 3.1 | Author: Harvey_Husky",
|
||||||
"pack_format": 15
|
"pack_format": 15,
|
||||||
|
"supported_formats": {
|
||||||
|
"min_inclusive": 15,
|
||||||
|
"max_inclusive": 26
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overlays": {
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"formats": {
|
||||||
|
"min_inclusive": 16,
|
||||||
|
"max_inclusive": 26
|
||||||
|
},
|
||||||
|
"directory": "compat_16"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+21
-30
@@ -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',
|
||||||
@@ -129,7 +128,7 @@ __on_close() -> (
|
|||||||
write_file('team_cache', 'json', global_team_cache);
|
write_file('team_cache', 'json', global_team_cache);
|
||||||
);
|
);
|
||||||
|
|
||||||
if(require_version('1.4.112'), // 新功能支持
|
if(require_version('1.4.999'), // 待支持
|
||||||
__on_player_command(player, command) -> (
|
__on_player_command(player, command) -> (
|
||||||
l = length(command);
|
l = length(command);
|
||||||
if(l > 13
|
if(l > 13
|
||||||
@@ -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);
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// 重载配置文件
|
// 重载配置文件
|
||||||
@@ -203,8 +199,8 @@ reload_configs() -> (
|
|||||||
global_config:'config_version' = '1.0.0'; // 占位用,无实际作用
|
global_config:'config_version' = '1.0.0'; // 占位用,无实际作用
|
||||||
config_changed = true;
|
config_changed = true;
|
||||||
);
|
);
|
||||||
// 新功能支持
|
// 待支持
|
||||||
if(require_version('1.4.112') && !contains(global_config, 'allow_spawn_whitelist_player'),
|
if(require_version('1.4.999') && !contains(global_config, 'allow_spawn_whitelist_player'),
|
||||||
global_config:'allow_spawn_whitelist_player' = false;
|
global_config:'allow_spawn_whitelist_player' = false;
|
||||||
config_changed = true;
|
config_changed = true;
|
||||||
);
|
);
|
||||||
@@ -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 < -1000000000, // 避免溢出
|
||||||
|
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