Compare commits
27 Commits
| 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 |
Vendored
+2
-2
@@ -17,6 +17,6 @@
|
||||
"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}"
|
||||
},
|
||||
"datapack.env.cmdVersion": "1.20",
|
||||
"datapack.env.dataVersion": "1.20"
|
||||
"datapack.env.cmdVersion": "1.20.2",
|
||||
"datapack.env.dataVersion": "1.20.4"
|
||||
}
|
||||
@@ -2,30 +2,21 @@
|
||||
|
||||
为FZ服务器写的Minecraft生存辅助数据包
|
||||
|
||||
#### @Author: Harvey_Husky
|
||||
|
||||
#### Copyright (C) 2019-2023 Harvey_Husky
|
||||
|
||||
[Bilibili专栏](https://www.bilibili.com/read/cv4267319)(年久失修)
|
||||
|
||||
## 安装教程
|
||||
|
||||
1. 兼容性
|
||||
- `数据包 v3.1.x` 支持 `Minecraft 1.20.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版本的数据包
|
||||
3. 从zip文件的 `scripts` 目录中挑选你需要的 `.sc` 文件
|
||||
4. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
||||
5. (可选)下载并安装 [Carpet Mod **1.4.24**](https://github.com/gnembon/fabric-carpet/releases) 或以上版本
|
||||
6. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||
7. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`)
|
||||
3. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
||||
4. (可选)下载并安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases)
|
||||
5. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||
- **注意:如果未正确安装该脚本,数据包会强制禁用 carpet mod 的 `player` 命令以避免假人污染记分板,需要在安装好脚本后手动启用 `player` 命令**
|
||||
6. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`)
|
||||
|
||||
# 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)
|
||||
|
||||
@@ -80,11 +71,11 @@
|
||||
- 如果你不知道 Carpet Mod 或 Carpet 脚本,请忽略本节
|
||||
- 需要安装 [Carpet Mod](https://github.com/gnembon/fabric-carpet/releases)
|
||||
- 从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||
- **注意:如果未正确安装该脚本,数据包会强制禁用 carpet mod 的 `player` 命令以避免假人污染记分板,需要在安装好脚本后手动启用 `player` 命令**
|
||||
- 脚本:
|
||||
- `fzsd_score.sc`:
|
||||
- 可避免Carpet假人污染计分板
|
||||
- 可以标记哪些玩家是假人
|
||||
- *注:请不要使用为假人名添加“bot”前缀的carpet扩展,本插件不支持此类假人!*
|
||||
- 子命令( `/fzsd_score <子命令>` ):
|
||||
- `updateFrom <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!)
|
||||
- `recalculate`:重新计算所有计分板总分
|
||||
@@ -108,8 +99,12 @@
|
||||
|
||||
### 其他
|
||||
|
||||
- 见游戏内交互器按钮
|
||||
- 扫地机
|
||||
- 获取当前维度和坐标(以及对应的主世界、下界坐标)(私信/广播)
|
||||
- 获取上次死亡维度和坐标(私信)
|
||||
- 获取上次穿出的下界传送门坐标(私信/广播)
|
||||
- 获取上个重生点维度和坐标(私信)
|
||||
|
||||
## 开发者相关
|
||||
|
||||
- 参见[开发文档](/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
|
||||
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
|
||||
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
|
||||
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
|
||||
function #fzsd:module/health/try_load
|
||||
function fzsd:module/health/try_load
|
||||
@@ -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.2'}}
|
||||
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
|
||||
function fzsd:system/carpet/try_load_fzsd_score
|
||||
function #fzsd:load
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 调用者: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
|
||||
@@ -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
|
||||
@@ -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 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
|
||||
|
||||
@@ -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]
|
||||
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:the_nether"
|
||||
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]
|
||||
data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld"
|
||||
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
|
||||
@@ -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 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: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 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 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 @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 910 run scoreboard players set @s fzsd.module.interactor.player.config 0
|
||||
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
|
||||
@@ -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"}}]]
|
||||
## 如果玩家未关闭抬头蹲起功能
|
||||
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: 数字有待商榷
|
||||
## @s this player
|
||||
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": "今晚可能会生成幻翼,建议睡觉!"}]
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
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", "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 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 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", "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 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 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", "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 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 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": "]"}]]
|
||||
@@ -1,3 +1,4 @@
|
||||
# 这个文件并不会自动执行,有需要可以手动执行
|
||||
carpet setDefault language zh_cn
|
||||
carpet setDefault stackableShulkerBoxes 16
|
||||
carpet setDefault leadFix true
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
## 整数类型
|
||||
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",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:minecart\"}}"
|
||||
}
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"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_wood",
|
||||
"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_nether_portal/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_nether_portal/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"
|
||||
]
|
||||
}
|
||||
@@ -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,
|
||||
"__comment": "调用者:data/fzsd/functions/module/phantom_warning/check_time_since_rest.mcfunction",
|
||||
"values": [
|
||||
"fzsd:module/phantom_warning/send_phantom_warning"
|
||||
]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd:module/sweeper/clear",
|
||||
"fzsd:module/sweeper/post_loop",
|
||||
"fzsd:module/sweeper/pre_loop",
|
||||
"fzsd:module/sweeper/start_timer",
|
||||
"fzsd:module/sweeper/bossbar"
|
||||
]
|
||||
|
||||
+16
-1
@@ -1,6 +1,21 @@
|
||||
{
|
||||
"pack": {
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ __on_close() -> (
|
||||
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) -> (
|
||||
l = length(command);
|
||||
if(l > 13
|
||||
@@ -199,8 +199,8 @@ reload_configs() -> (
|
||||
global_config:'config_version' = '1.0.0'; // 占位用,无实际作用
|
||||
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;
|
||||
config_changed = true;
|
||||
);
|
||||
@@ -428,7 +428,7 @@ command_recalculate_total_score(scoreboard) -> (
|
||||
for(scoreboard(scoreboard),
|
||||
if(_ != total_score_name_new,
|
||||
current_player_score = scoreboard(scoreboard, _);
|
||||
if(current_player_score < 0, // 避免溢出
|
||||
if(current_player_score < -1000000000, // 避免溢出
|
||||
current_player_score = 2147483647;
|
||||
scoreboard(scoreboard, _, 2147483647);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user