完善here、last_death
This commit is contained in:
parent
596ebd9d64
commit
4a69d7d927
2
data/fz/functions/api/get_dimension.mcfunction
Normal file
2
data/fz/functions/api/get_dimension.mcfunction
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
data modify storage fz:global fz.cache.dimension.id set from entity @s Dimension
|
||||||
|
data modify storage fz:global fz.cache.dimension.name set value '{"nbt": "fz.cache.dimension.id", "storage": "fz:global"}'
|
@ -0,0 +1 @@
|
|||||||
|
execute if data storage fz:global fz.cache.dimension{id:'minecraft:overworld'} run data modify storage fz:global fz.cache.dimension.name set value '{"text": "主世界", "color": "dark_green"}'
|
@ -0,0 +1 @@
|
|||||||
|
execute if data storage fz:global fz.cache.dimension{id:'minecraft:the_nether'} run data modify storage fz:global fz.cache.dimension.name set value '{"text": "下届", "color": "dark_red"}'
|
@ -1,2 +1,9 @@
|
|||||||
execute unless data storage fz:installed fz.global run function #fz:install
|
|
||||||
execute if data storage fz:installed fz{global:1b} run function #fz:load
|
|
||||||
|
function #fz:install
|
||||||
|
function #fz:load
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# execute unless data storage fz:installed fz.global run function #fz:install
|
||||||
|
# execute if data storage fz:installed fz{global:1b} run function #fz:load
|
@ -44,4 +44,4 @@ scoreboard objectives add fz.event.used_tool.netherite_sword minecraft.used:neth
|
|||||||
data modify storage fz:installed fz.event set value 1b
|
data modify storage fz:installed fz.event set value 1b
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装系统组件:事件"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已安装系统组件:游戏事件"}]
|
4
data/fz/functions/game_event/load.mcfunction
Normal file
4
data/fz/functions/game_event/load.mcfunction
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
execute as @a run function #fz:game_event/reset_all
|
||||||
|
|
||||||
|
## 调试
|
||||||
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已加载系统组件:游戏事件"}]
|
@ -44,4 +44,4 @@ scoreboard objectives remove fz.event.used_tool.netherite_sword
|
|||||||
data remove storage fz:installed fz.event
|
data remove storage fz:installed fz.event
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载系统组件:事件"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载系统组件:游戏事件"}]
|
@ -21,8 +21,11 @@ data modify storage fz:logger fz.exception.load_without_install_exception set va
|
|||||||
## 首次安装时日志等级默认为一般消息
|
## 首次安装时日志等级默认为一般消息
|
||||||
execute unless data storage fz:logger fz.levels.current run data modify storage fz:logger fz.levels.current set value 500
|
execute unless data storage fz:logger fz.levels.current run data modify storage fz:logger fz.levels.current set value 500
|
||||||
|
|
||||||
|
## 读取日志等级存入缓存
|
||||||
|
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
||||||
|
|
||||||
## 标记为已安装
|
## 标记为已安装
|
||||||
data modify storage fz:installed fz.logger set value 1b
|
data modify storage fz:installed fz.logger set value 1b
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装系统组件:日志"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已安装系统组件:日志"}]
|
@ -4,4 +4,4 @@
|
|||||||
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
execute store result score fz.logger.level fz.variable.integer run data get storage fz:logger fz.levels.current
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已加载系统组件:日志"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已加载系统组件:日志"}]
|
@ -4,7 +4,7 @@
|
|||||||
data remove storage fz:installed fz.logger
|
data remove storage fz:installed fz.logger
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载系统组件:日志"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载系统组件:日志"}]
|
||||||
|
|
||||||
## 询问是否清除数据
|
## 询问是否清除数据
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除日志配置吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:logger/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}]
|
execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除日志配置吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:logger/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}]
|
@ -1,6 +1,5 @@
|
|||||||
|
schedule clear fz:module/config/loop
|
||||||
|
execute as @a run function #fz:module/config/reset_trigger
|
||||||
function #fz:module/config/reset_trigger
|
|
||||||
|
|
||||||
## 日志
|
## 日志
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已加载组件:配置"}]
|
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已加载组件:配置"}]
|
@ -1,7 +1,6 @@
|
|||||||
# 调用者:fz:module/config/trigger
|
# 调用者:fz:module/config/trigger
|
||||||
|
|
||||||
## 如果分数大于0说明玩家点击了按钮
|
## 如果分数大于0说明玩家点击了按钮
|
||||||
execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:module/config/on_click
|
execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:module/config/on_click/on_click
|
||||||
execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:module/config/reset_trigger
|
|
||||||
|
|
||||||
schedule function fz:module/config/loop 1t replace
|
schedule function fz:module/config/loop 1t replace
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
# 调用者:#fz:module/config/on_click
|
# 调用者:#fz:module/config/on_click
|
||||||
##### 处理玩家点击,并进行下一步操作
|
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "点击了配置按钮,触发器分数为:"}, {"score": {"name": "@s", "objective": "fz.module.config.trigger"}}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "点击了配置按钮,触发器分数为:"}, {"score": {"name": "@s", "objective": "fz.module.config.trigger"}}]
|
||||||
|
|
||||||
execute if score @s fz.module.config.trigger matches 1000..1999 run function #fz:module/scoreboard/config/on_click
|
|
||||||
|
|
||||||
## 重新显示一次按钮
|
|
||||||
function #fz:module/config/display
|
|
||||||
|
@ -1,13 +1,2 @@
|
|||||||
# 调用者:#fz:module/config/on_config
|
|
||||||
##### 玩家抬头到最高角度并蹲起后,触发此函数
|
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "触发了配置功能"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "触发了配置页面"}]
|
||||||
|
|
||||||
function fz:module/config/loop
|
|
||||||
|
|
||||||
## 显示按钮
|
|
||||||
function #fz:module/config/display
|
|
||||||
|
|
||||||
## 设置或重制超时时间
|
|
||||||
schedule function #fz:module/config/timeout 300s replace
|
|
2
data/fz/functions/module/config/reset_timeout.mcfunction
Normal file
2
data/fz/functions/module/config/reset_timeout.mcfunction
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
## 设置或重制超时时间
|
||||||
|
schedule function #fz:module/config/timeout 300s replace
|
@ -1,4 +1,3 @@
|
|||||||
function #fz:module/health/set_health_name
|
|
||||||
execute unless data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fz.module.health
|
execute unless data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fz.module.health
|
||||||
execute if data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName
|
execute if data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName
|
||||||
execute unless data storage fz:config fz.module.health.display{list: 0b} run scoreboard objectives setdisplay list fz.module.health
|
execute unless data storage fz:config fz.module.health.display{list: 0b} run scoreboard objectives setdisplay list fz.module.health
|
||||||
|
@ -1 +0,0 @@
|
|||||||
execute if data storage fz:data_viewer fz.here.cache{dimension:"minecraft:overworld"} run function fz:module/here/custom_dimension_message/if_in_overworld
|
|
@ -1 +0,0 @@
|
|||||||
execute if data storage fz:data_viewer fz.here.cache{dimension:"minecraft:the_nether"} run function fz:module/here/custom_dimension_message/if_in_the_nether
|
|
@ -2,5 +2,4 @@ data modify storage fz:here fz.cache.nether_pos set value [0, 0]
|
|||||||
execute store result storage fz:here fz.cache.nether_pos[0] int 0.125 run data get entity @s Pos[0]
|
execute store result storage fz:here fz.cache.nether_pos[0] int 0.125 run data get entity @s Pos[0]
|
||||||
execute store result storage fz:here fz.cache.nether_pos[1] int 0.125 run data get entity @s Pos[2]
|
execute store result storage fz:here fz.cache.nether_pos[1] int 0.125 run data get entity @s Pos[2]
|
||||||
|
|
||||||
data modify storage fz:here fz.cache.message[0] set value '{"text": "主世界", "color": "dark_green"}'
|
|
||||||
data modify storage fz:here fz.cache.message[2] set value '[{"text": ",对应", "color": "white"}, {"text": "下届", "color": "dark_red"}, {"text": ":"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.nether_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.nether_pos[1]", "storage": "fz:here"}, {"text": "]"}]]'
|
data modify storage fz:here fz.cache.message[2] set value '[{"text": ",对应", "color": "white"}, {"text": "下届", "color": "dark_red"}, {"text": ":"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.nether_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.nether_pos[1]", "storage": "fz:here"}, {"text": "]"}]]'
|
@ -2,5 +2,4 @@ data modify storage fz:here fz.cache.overworld_pos set value [0, 0]
|
|||||||
execute store result storage fz:here fz.cache.overworld_pos[0] int 8 run data get entity @s Pos[0]
|
execute store result storage fz:here fz.cache.overworld_pos[0] int 8 run data get entity @s Pos[0]
|
||||||
execute store result storage fz:here fz.cache.overworld_pos[1] int 8 run data get entity @s Pos[2]
|
execute store result storage fz:here fz.cache.overworld_pos[1] int 8 run data get entity @s Pos[2]
|
||||||
|
|
||||||
data modify storage fz:here fz.cache.message[0] set value '{"text": "下届", "color": "dark_red"}'
|
|
||||||
data modify storage fz:here fz.cache.message[2] set value '[{"text": ",对应", "color": "white"}, {"text": "主世界", "color": "dark_green"}, {"text": ":"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.overworld_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.overworld_pos[1]", "storage": "fz:here"}, {"text": "]"}]]'
|
data modify storage fz:here fz.cache.message[2] set value '[{"text": ",对应", "color": "white"}, {"text": "主世界", "color": "dark_green"}, {"text": ":"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.overworld_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.overworld_pos[1]", "storage": "fz:here"}, {"text": "]"}]]'
|
@ -0,0 +1 @@
|
|||||||
|
execute if data storage fz:global fz.cache.dimension{id:"minecraft:overworld"} run function fz:module/here/get_dimension_message/if_overworld
|
@ -0,0 +1 @@
|
|||||||
|
execute if data storage fz:global fz.cache.dimension{id:"minecraft:the_nether"} run function fz:module/here/get_dimension_message/if_the_nether
|
@ -1,9 +1,8 @@
|
|||||||
data modify storage fz:here fz.cache.dimension set from entity @s Dimension
|
## fz.cache.pos已在install中初始化
|
||||||
data modify storage fz:here fz.cache.pos set value [0, 0, 0]
|
|
||||||
execute store result storage fz:here fz.cache.pos[0] int 1 run data get entity @s Pos[0]
|
execute store result storage fz:here fz.cache.pos[0] int 1 run data get entity @s Pos[0]
|
||||||
execute store result storage fz:here fz.cache.pos[1] int 1 run data get entity @s Pos[1]
|
execute store result storage fz:here fz.cache.pos[1] int 1 run data get entity @s Pos[1]
|
||||||
execute store result storage fz:here fz.cache.pos[2] int 1 run data get entity @s Pos[2]
|
execute store result storage fz:here fz.cache.pos[2] int 1 run data get entity @s Pos[2]
|
||||||
data modify storage fz:here fz.cache.message set value ["", "", ""]
|
data modify storage fz:here fz.cache.message set value ['{"nbt": "fz.cache.dimension.name", "interpret": true, "storage": "fz:global"}', '[{"text": "[", "color": "green"}, {"nbt": "fz.cache.pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.pos[1]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.pos[2]", "storage": "fz:here"}, {"text": "]"}]', '']
|
||||||
data modify storage fz:here fz.cache.message[0] set value '{"nbt": "fz.cache.dimension", "storage": "fz:here"}'
|
|
||||||
data modify storage fz:here fz.cache.message[1] set value '[{"text": "[", "color": "green"}, {"nbt": "fz.cache.pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.pos[1]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.pos[2]", "storage": "fz:here"}, {"text": "]"}]'
|
## 调试
|
||||||
function #fz:module/here/custom_message
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了位置信息"}]
|
@ -1,3 +1 @@
|
|||||||
function fz:module/here/get_message
|
|
||||||
|
|
||||||
tellraw @a [{"text": "", "color": "white"}, {"selector": "@s"}, {"text": "说:"}, {"text": "我在"}, {"nbt": "fz.cache.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[2]", "interpret": true, "storage": "fz:here"}]
|
tellraw @a [{"text": "", "color": "white"}, {"selector": "@s"}, {"text": "说:"}, {"text": "我在"}, {"nbt": "fz.cache.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[2]", "interpret": true, "storage": "fz:here"}]
|
7
data/fz/functions/module/here/install.mcfunction
Normal file
7
data/fz/functions/module/here/install.mcfunction
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
data modify storage fz:here fz.cache.pos set value [0, 0, 0]
|
||||||
|
|
||||||
|
## 标记为已安装
|
||||||
|
data modify storage fz:installed fz.module.here set value 1b
|
||||||
|
|
||||||
|
## 日志
|
||||||
|
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装组件:here"}]
|
@ -1,3 +1 @@
|
|||||||
function fz:module/here/get_message
|
|
||||||
|
|
||||||
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fz.cache.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[2]", "interpret": true, "storage": "fz:here"}]
|
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fz.cache.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[2]", "interpret": true, "storage": "fz:here"}]
|
@ -1 +1,7 @@
|
|||||||
data remove storage fz:here fz
|
data remove storage fz:here fz
|
||||||
|
|
||||||
|
## 标记为已卸载
|
||||||
|
data modify storage fz:installed fz.module.here set value 0b
|
||||||
|
|
||||||
|
## 日志
|
||||||
|
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载组件:here"}]
|
@ -0,0 +1,9 @@
|
|||||||
|
data modify storage fz:global fz.cache.dimension.id set from entity @s LastDeathLocation.dimension
|
||||||
|
data modify storage fz:global fz.cache.dimension.name set from entity @s LastDeathLocation.dimension
|
||||||
|
## fz.cache.pos已在install中初始化
|
||||||
|
execute store result storage fz:last_death fz.cache.pos[0] int 1 run data get entity @s LastDeathLocation.pos[0]
|
||||||
|
execute store result storage fz:last_death fz.cache.pos[1] int 1 run data get entity @s LastDeathLocation.pos[1]
|
||||||
|
execute store result storage fz:last_death fz.cache.pos[2] int 1 run data get entity @s LastDeathLocation.pos[2]
|
||||||
|
|
||||||
|
## 调试
|
||||||
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了死亡点"}]
|
7
data/fz/functions/module/last_death/install.mcfunction
Normal file
7
data/fz/functions/module/last_death/install.mcfunction
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
data modify storage fz:last_death fz.cache.pos set value [0, 0, 0]
|
||||||
|
|
||||||
|
## 标记为已安装
|
||||||
|
data modify storage fz:installed fz.module.last_death set value 1b
|
||||||
|
|
||||||
|
## 日志
|
||||||
|
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装组件:死亡点"}]
|
@ -0,0 +1 @@
|
|||||||
|
tellraw @s [{"text": "你的上次死亡位于"}, {"nbt": "fz.cache.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.pos[0]", "storage": "fz:last_death"}, {"text": ", "}, {"nbt": "fz.cache.pos[1]", "storage": "fz:last_death"}, {"text": ", "}, {"nbt": "fz.cache.pos[2]", "storage": "fz:last_death"}, {"text": "]"}]]
|
7
data/fz/functions/module/last_death/uninstall.mcfunction
Normal file
7
data/fz/functions/module/last_death/uninstall.mcfunction
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
data remove storage fz:last_death fz
|
||||||
|
|
||||||
|
## 标记为已卸载
|
||||||
|
data modify storage fz:installed fz.module.last_death set value 0b
|
||||||
|
|
||||||
|
## 日志
|
||||||
|
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载组件:死亡点"}]
|
@ -0,0 +1,4 @@
|
|||||||
|
## 重置计分板最大id计数
|
||||||
|
scoreboard players set fz.module.scoreboard.display.highest_id fz.variable.integer -1
|
||||||
|
### 重置轮播计分板ID
|
||||||
|
scoreboard players set fz.module.scoreboard.display.current_id fz.variable.integer 0
|
@ -1,8 +1,5 @@
|
|||||||
# 调用者:#fz:module/scoreboard/load
|
# 调用者:#fz:module/scoreboard/load
|
||||||
|
|
||||||
## 异常检测
|
|
||||||
execute unless data storage fz:install_manager fz.module{scoreboard: 1b} run tellraw @a [{"nbt": "fz.exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
|
|
||||||
|
|
||||||
## 调试
|
## 调试
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "计分板显示文本已设为:"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "计分板显示文本已设为:"}]
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.general - "}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.general - "}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}]
|
||||||
@ -15,17 +12,5 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @
|
|||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.kill_count - "}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.kill_count - "}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}]
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.trade_count - "}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}]
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.trade_count - "}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}]
|
||||||
|
|
||||||
## 初始化计分板显示
|
|
||||||
### 重置计分板最大id计数
|
|
||||||
scoreboard players set fz.module.scoreboard.display.highest_id fz.variable.integer -1
|
|
||||||
### 设置颜色、名称
|
|
||||||
function #fz:module/scoreboard/display/set_text
|
|
||||||
### 设置运行时计分板id,同时会计算最大id数
|
|
||||||
function fz:module/scoreboard/display/register_id
|
|
||||||
### 重置轮播计分板ID
|
|
||||||
scoreboard players set fz.module.scoreboard.display.current_id fz.variable.integer 0
|
|
||||||
### 开启轮播循环
|
|
||||||
function fz:module/scoreboard/display/carousel/loop
|
|
||||||
|
|
||||||
## 日志
|
## 日志
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已加载组件:计分板"}]
|
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已加载组件:计分板"}]
|
@ -25,6 +25,24 @@ team remove fz.module.scoreboard.display.kill_count
|
|||||||
### 交易榜
|
### 交易榜
|
||||||
team remove fz.module.scoreboard.display.trade_count
|
team remove fz.module.scoreboard.display.trade_count
|
||||||
|
|
||||||
|
## 关闭计分板显示
|
||||||
|
scoreboard objectives setdisplay sidebar.team.aqua
|
||||||
|
scoreboard objectives setdisplay sidebar.team.black
|
||||||
|
scoreboard objectives setdisplay sidebar.team.blue
|
||||||
|
scoreboard objectives setdisplay sidebar.team.dark_aqua
|
||||||
|
scoreboard objectives setdisplay sidebar.team.dark_blue
|
||||||
|
scoreboard objectives setdisplay sidebar.team.dark_gray
|
||||||
|
scoreboard objectives setdisplay sidebar.team.dark_green
|
||||||
|
scoreboard objectives setdisplay sidebar.team.dark_purple
|
||||||
|
scoreboard objectives setdisplay sidebar.team.dark_red
|
||||||
|
scoreboard objectives setdisplay sidebar.team.gold
|
||||||
|
scoreboard objectives setdisplay sidebar.team.gray
|
||||||
|
scoreboard objectives setdisplay sidebar.team.green
|
||||||
|
scoreboard objectives setdisplay sidebar.team.light_purple
|
||||||
|
scoreboard objectives setdisplay sidebar.team.red
|
||||||
|
scoreboard objectives setdisplay sidebar.team.white
|
||||||
|
scoreboard objectives setdisplay sidebar.team.yellow
|
||||||
|
|
||||||
## 询问是否清除数据
|
## 询问是否清除数据
|
||||||
execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除计分板数据吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:module/scoreboard/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}]
|
execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除计分板数据吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:module/scoreboard/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}]
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
# 调用者:#fz:module/try_load
|
|
||||||
|
|
||||||
## 判断是否从未安装,如果是则安装
|
|
||||||
execute unless data storage fz:installed fz.module.config run function #fz:module/config/install
|
|
||||||
execute unless data storage fz:installed fz.module.scoreboard run function #fz:module/scoreboard/install
|
|
@ -1,4 +1,5 @@
|
|||||||
## 标记为已卸载
|
## 标记为已卸载
|
||||||
|
data remove storage fz:installed fz
|
||||||
data modify storage fz:installed fz.global set value 0b
|
data modify storage fz:installed fz.global set value 0b
|
||||||
|
|
||||||
## 日志
|
## 日志
|
||||||
|
7
data/fz/tags/functions/api/get_dimension.json
Normal file
7
data/fz/tags/functions/api/get_dimension.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fz:api/get_dimension",
|
||||||
|
"#fz:api/get_dimension_name"
|
||||||
|
]
|
||||||
|
}
|
7
data/fz/tags/functions/api/get_dimension_name.json
Normal file
7
data/fz/tags/functions/api/get_dimension_name.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fz:api/get_dimension_name/overworld",
|
||||||
|
"fz:api/get_dimension_name/the_nether"
|
||||||
|
]
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"fz:module/config/on_click",
|
"fz:module/config/on_click",
|
||||||
|
"#fz:module/config/display",
|
||||||
"fz:module/scoreboard/config/on_click"
|
"fz:module/scoreboard/config/on_click"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"#fz:module/config/on_click",
|
||||||
|
"#fz:module/config/reset_trigger"
|
||||||
|
]
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"__comment": "调用者:fz:event/on_unsneak,当玩家抬头到最高角度并蹲起后,触发此事件",
|
"__comment": "调用者:fz:event/on_unsneak,当玩家抬头到最高角度并蹲起后,触发此事件",
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"fz:module/config/on_config"
|
"fz:module/config/loop",
|
||||||
|
"#fz:module/config/display"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
|
"#fz:module/health/set_health_name",
|
||||||
"fz:module/health/load"
|
"fz:module/health/load"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"replace": false,
|
|
||||||
"values": [
|
|
||||||
"fz:module/here/custom_dimension_message/overworld",
|
|
||||||
"fz:module/here/custom_dimension_message/the_nether"
|
|
||||||
]
|
|
||||||
}
|
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fz:module/here/get_dimension_message/overworld",
|
||||||
|
"fz:module/here/get_dimension_message/the_nether"
|
||||||
|
]
|
||||||
|
}
|
8
data/fz/tags/functions/module/here/get_message.json
Normal file
8
data/fz/tags/functions/module/here/get_message.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"#fz:api/get_dimension",
|
||||||
|
"fz:module/here/get_message",
|
||||||
|
"#fz:module/here/get_dimension_message"
|
||||||
|
]
|
||||||
|
}
|
7
data/fz/tags/functions/module/here/global_message.json
Normal file
7
data/fz/tags/functions/module/here/global_message.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"#fz:module/here/get_message",
|
||||||
|
"fz:module/here/global_message"
|
||||||
|
]
|
||||||
|
}
|
6
data/fz/tags/functions/module/here/install.json
Normal file
6
data/fz/tags/functions/module/here/install.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fz:module/here/install"
|
||||||
|
]
|
||||||
|
}
|
7
data/fz/tags/functions/module/here/private_message.json
Normal file
7
data/fz/tags/functions/module/here/private_message.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"#fz:module/here/get_message",
|
||||||
|
"fz:module/here/private_message"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fz:module/last_death/get_death_point",
|
||||||
|
"#fz:api/get_dimension_name"
|
||||||
|
]
|
||||||
|
}
|
6
data/fz/tags/functions/module/last_death/install.json
Normal file
6
data/fz/tags/functions/module/last_death/install.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fz:module/last_death/install"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"#fz:module/last_death/get_death_point",
|
||||||
|
"fz:module/last_death/private_message"
|
||||||
|
]
|
||||||
|
}
|
6
data/fz/tags/functions/module/last_death/uninstall.json
Normal file
6
data/fz/tags/functions/module/last_death/uninstall.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"fz:module/last_death/uninstall"
|
||||||
|
]
|
||||||
|
}
|
@ -2,6 +2,10 @@
|
|||||||
"__comment": "调用者:fz:module/try_load",
|
"__comment": "调用者:fz:module/try_load",
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
|
"fz:module/scoreboard/display/reset_id",
|
||||||
|
"fz:module/scoreboard/display/register_id",
|
||||||
|
"#fz:module/scoreboard/display/set_text",
|
||||||
|
"fz:module/scoreboard/display/carousel/loop",
|
||||||
"fz:module/scoreboard/load"
|
"fz:module/scoreboard/load"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"__comment": "调用者:fz:load",
|
|
||||||
"replace": false,
|
|
||||||
"values": [
|
|
||||||
"fz:module/try_install"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,6 +1,10 @@
|
|||||||
{
|
{
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"#fz:module/try_install"
|
"#fz:module/config/install",
|
||||||
|
"#fz:module/health/install",
|
||||||
|
"#fz:module/here/install",
|
||||||
|
"#fz:module/last_death/install",
|
||||||
|
"#fz:module/scoreboard/install"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -3,7 +3,6 @@
|
|||||||
"values": [
|
"values": [
|
||||||
"fz:system/install",
|
"fz:system/install",
|
||||||
"fz:logger/install",
|
"fz:logger/install",
|
||||||
"fz:logger/load",
|
|
||||||
"fz:game_event/install"
|
"fz:game_event/install"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"fz:system/load",
|
"fz:system/load",
|
||||||
"fz:logger/load"
|
"fz:logger/load",
|
||||||
|
"fz:game_event/load"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
"#fz:module/config/uninstall",
|
"#fz:module/config/uninstall",
|
||||||
"#fz:module/health/uninstall",
|
"#fz:module/health/uninstall",
|
||||||
"#fz:module/here/uninstall",
|
"#fz:module/here/uninstall",
|
||||||
|
"#fz:module/last_death/uninstall",
|
||||||
"#fz:module/scoreboard/uninstall"
|
"#fz:module/scoreboard/uninstall"
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user