完善…模块

This commit is contained in:
延皓
2022-07-11 15:40:55 +08:00
parent 4a69d7d927
commit d85e07874f
49 changed files with 181 additions and 37 deletions
@@ -0,0 +1,5 @@
execute if predicate fz:in_dimension_overworld run scoreboard players set @s fz.module.last_nether_portal.dimension 0
execute if predicate fz:in_dimension_the_nether run scoreboard players set @s fz.module.last_nether_portal.dimension -1
execute store result score @s fz.module.last_nether_portal.x run data get entity @s Pos[0]
execute store result score @s fz.module.last_nether_portal.y run data get entity @s Pos[1]
execute store result score @s fz.module.last_nether_portal.z run data get entity @s Pos[2]
@@ -0,0 +1,2 @@
execute if score @s fz.module.last_nether_portal.dimension matches 0 run data modify storage fz:global fz.api.dimension.id set value "minecraft:overworld"
execute if score @s fz.module.last_nether_portal.dimension matches -1 run data modify storage fz:global fz.api.dimension.id set value "minecraft:the_nether"
@@ -0,0 +1 @@
tellraw @a [{"selector": "@s"}, [{"text": "说:我上次穿出的下界传送门位于", "color": "white"}, {"nbt": "fz.message", "interpret": true, "storage": "fz:last_nether_portal"}]]
@@ -0,0 +1,5 @@
scoreboard objectives add fz.module.last_nether_portal.dimension dummy
scoreboard objectives add fz.module.last_nether_portal.x dummy
scoreboard objectives add fz.module.last_nether_portal.y dummy
scoreboard objectives add fz.module.last_nether_portal.z dummy
data modify storage fz:last_nether_portal fz.message set value '[{"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"score": {"name": "@s", "objective": "fz.module.last_nether_portal.x"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fz.module.last_nether_portal.z"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fz.module.last_nether_portal.z"}}, {"text": "]"}]]'
@@ -0,0 +1 @@
tellraw @a [{"text": "你上次穿出的下界传送门位于"}, {"nbt": "fz.message", "interpret": true, "storage": "fz:last_nether_portal"}]
@@ -0,0 +1,4 @@
scoreboard objectives remove fz.module.last_nether_portal.x
scoreboard objectives remove fz.module.last_nether_portal.y
scoreboard objectives remove fz.module.last_nether_portal.z
data remove storage fz:last_nether_portal fz