support mc1.21;需要放弃支持mc1.20

This commit is contained in:
Harvey_Husky
2024-06-16 11:01:54 +08:00
parent 61a9f25505
commit d81d0a530a
919 changed files with 6094 additions and 386 deletions
@@ -0,0 +1,7 @@
data modify storage fzsd:global fzsd.api.dimension.id set from entity @s SpawnDimension
data modify storage fzsd:last_spawn_point fzsd.x set from entity @s SpawnX
data modify storage fzsd:last_spawn_point fzsd.y set from entity @s SpawnY
data modify storage fzsd:last_spawn_point fzsd.z set from entity @s SpawnZ
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了出生点"}]
@@ -0,0 +1,5 @@
##
data modify storage fzsd:install fzsd.module.last_spawn_point set value 1b
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:上一出生点"}]
@@ -0,0 +1 @@
execute if data storage fzsd:install fzsd.module{last_spawn_point:1b} run tellraw @s [{"text": "获取上一出生点:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2300"}},{"text": "私信", "color": "aqua"},{"text": "]"}]]
@@ -0,0 +1 @@
execute if score @s fzsd.module.interactor.trigger matches -2300 run function #fzsd:module/last_spawn_point/private_message
@@ -0,0 +1,2 @@
execute if data entity @s SpawnDimension run tellraw @s [{"text": "你的上个出生点位于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:last_spawn_point"}, {"text": "]"}]]
execute unless data entity @s SpawnDimension run tellraw @s {"text": "你从未设置过出生点!"}
@@ -0,0 +1 @@
execute unless data storage fzsd:install fzsd.module{last_spawn_point:0b} run function #fzsd:module/last_spawn_point/install
@@ -0,0 +1,5 @@
##
data modify storage fzsd:install fzsd.module.last_spawn_point set value 0b
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:上一出生点"}]