完善…模块
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
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[1] int 0.125 run data get entity @s Pos[2]
|
||||
|
||||
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.nether_pos set value [0, 0]
|
||||
execute store result storage fz:here fz.nether_pos[0] int 0.125 run data get entity @s Pos[0]
|
||||
execute store result storage fz:here fz.nether_pos[1] int 0.125 run data get entity @s Pos[2]
|
||||
data modify storage fz:global fz.api.dimension.id set value "minecraft:the_nether"
|
||||
function #fz:api/get_dimension_name
|
||||
data modify storage fz:here fz.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.nether_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.nether_pos[1]", "storage": "fz:here"}, {"text": "]"}]]'
|
||||
@@ -1,5 +1,6 @@
|
||||
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[1] int 8 run data get entity @s Pos[2]
|
||||
|
||||
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.overworld_pos set value [0, 0]
|
||||
execute store result storage fz:here fz.overworld_pos[0] int 8 run data get entity @s Pos[0]
|
||||
execute store result storage fz:here fz.overworld_pos[1] int 8 run data get entity @s Pos[2]
|
||||
data modify storage fz:global fz.api.dimension.id set value "minecraft:overworld"
|
||||
function #fz:api/get_dimension_name
|
||||
data modify storage fz:here fz.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.overworld_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.overworld_pos[1]", "storage": "fz:here"}, {"text": "]"}]]'
|
||||
@@ -1 +1 @@
|
||||
execute if data storage fz:global fz.cache.dimension{id:"minecraft:overworld"} run function fz:module/here/get_dimension_message/if_overworld
|
||||
execute if data storage fz:global fz.api.dimension{id:"minecraft:overworld"} run function fz:module/here/get_dimension_message/if_overworld
|
||||
@@ -1 +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
|
||||
execute if data storage fz:global fz.api.dimension{id:"minecraft:the_nether"} run function fz:module/here/get_dimension_message/if_the_nether
|
||||
@@ -1,8 +1,10 @@
|
||||
## fz.cache.pos已在install中初始化
|
||||
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[2] int 1 run data get entity @s Pos[2]
|
||||
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": "]"}]', '']
|
||||
execute store result storage fz:here fz.pos[0] int 1 run data get entity @s Pos[0]
|
||||
execute store result storage fz:here fz.pos[1] int 1 run data get entity @s Pos[1]
|
||||
execute store result storage fz:here fz.pos[2] int 1 run data get entity @s Pos[2]
|
||||
data modify storage fz:here fz.message[0] set from storage fz:global fz.api.dimension.name
|
||||
data modify storage fz:here fz.message[1] set value '[{"text": "[", "color": "green"}, {"nbt": "fz.pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.pos[1]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.pos[2]", "storage": "fz:here"}, {"text": "]"}]'
|
||||
data modify storage fz:here fz.message[2] set value ''
|
||||
|
||||
## 调试
|
||||
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 +1 @@
|
||||
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.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[2]", "interpret": true, "storage": "fz:here"}]
|
||||
@@ -1,4 +1,5 @@
|
||||
data modify storage fz:here fz.cache.pos set value [0, 0, 0]
|
||||
data modify storage fz:here fz.pos set value [0, 0, 0]
|
||||
data modify storage fz:here fz.message set value ['', '', '']
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fz:installed fz.module.here set value 1b
|
||||
|
||||
@@ -1 +1 @@
|
||||
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.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[2]", "interpret": true, "storage": "fz:here"}]
|
||||
@@ -1,5 +1,4 @@
|
||||
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
|
||||
data modify storage fz:global fz.api.dimension.id 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]
|
||||
|
||||
@@ -1 +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": "]"}]]
|
||||
tellraw @s [{"text": "你上次死亡于"}, {"nbt": "fz.api.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": "]"}]]
|
||||
@@ -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
|
||||
@@ -44,7 +44,7 @@ scoreboard objectives add fz.module.scoreboard.display.kill_count dummy
|
||||
team add fz.module.scoreboard.display.kill_count
|
||||
|
||||
### 放置榜
|
||||
scoreboard objectives add fz.module.scoreboard.placement_count dummy
|
||||
scoreboard objectives add fz.module.scoreboard.display.placement_count dummy
|
||||
team add fz.module.scoreboard.display.placement_count
|
||||
|
||||
### 交易榜
|
||||
|
||||
Reference in New Issue
Block a user