fz-survival-datapack/data/fz/functions/module/here/get_message.mcfunction

8 lines
921 B
Mcfunction
Raw Normal View History

2022-07-09 13:06:56 +08:00
## 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]
2022-07-09 13:06:56 +08:00
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 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": "获取了位置信息"}]