support mc1.21;需要放弃支持mc1.20
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
execute if predicate fzsd:in_dimension_overworld run scoreboard players set @s fzsd.module.last_nether_portal.dimension 0
|
||||
execute if predicate fzsd:in_dimension_the_nether run scoreboard players set @s fzsd.module.last_nether_portal.dimension -1
|
||||
execute store result score @s fzsd.module.last_nether_portal.x run data get entity @s Pos[0]
|
||||
execute store result score @s fzsd.module.last_nether_portal.y run data get entity @s Pos[1]
|
||||
execute store result score @s fzsd.module.last_nether_portal.z run data get entity @s Pos[2]
|
||||
@@ -0,0 +1,5 @@
|
||||
execute if score @s fzsd.module.last_nether_portal.dimension matches 0 run data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld"
|
||||
execute if score @s fzsd.module.last_nether_portal.dimension matches -1 run data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:the_nether"
|
||||
|
||||
## 调试
|
||||
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,2 @@
|
||||
execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @a [{"text": ""}, [{"selector": "@s"}, {"text": "说:我上次穿出的下界传送门位于", "color": "white"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.x"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.y"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.z"}}, {"text": "]"}]]]
|
||||
execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"}
|
||||
@@ -0,0 +1,10 @@
|
||||
scoreboard objectives add fzsd.module.last_nether_portal.dimension dummy
|
||||
scoreboard objectives add fzsd.module.last_nether_portal.x dummy
|
||||
scoreboard objectives add fzsd.module.last_nether_portal.y dummy
|
||||
scoreboard objectives add fzsd.module.last_nether_portal.z dummy
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fzsd:install fzsd.module.last_nether_portal 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_nether_portal: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 -2200"}},{"text": "私信", "color": "aqua"},{"text": "] "}], [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:所有人"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2210"}},{"text": "广播", "color": "aqua"},{"text": "]"}]]
|
||||
@@ -0,0 +1,2 @@
|
||||
execute if score @s fzsd.module.interactor.trigger matches -2200 run function #fzsd:module/last_nether_portal/private_message
|
||||
execute if score @s fzsd.module.interactor.trigger matches -2210 run function #fzsd:module/last_nether_portal/global_message
|
||||
@@ -0,0 +1,2 @@
|
||||
execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s [{"text": "你上次穿出的下界传送门位于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.x"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.y"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.z"}}, {"text": "]"}]]
|
||||
execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"}
|
||||
@@ -0,0 +1 @@
|
||||
execute unless data storage fzsd:install fzsd.module{last_nether_portal:0b} run function #fzsd:module/last_nether_portal/install
|
||||
@@ -0,0 +1,11 @@
|
||||
scoreboard objectives remove fzsd.module.last_nether_portal.dimension
|
||||
scoreboard objectives remove fzsd.module.last_nether_portal.x
|
||||
scoreboard objectives remove fzsd.module.last_nether_portal.y
|
||||
scoreboard objectives remove fzsd.module.last_nether_portal.z
|
||||
data remove storage fzsd:last_nether_portal fzsd
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fzsd:install fzsd.module.last_nether_portal 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": "已卸载组件:上次穿出的下界传送门"}]
|
||||
Reference in New Issue
Block a user