完善here、last_death

This commit is contained in:
延皓
2022-07-09 13:06:56 +08:00
parent 596ebd9d64
commit 4a69d7d927
58 changed files with 198 additions and 85 deletions
@@ -0,0 +1,9 @@
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
## 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]
execute store result storage fz:last_death fz.cache.pos[2] int 1 run data get entity @s LastDeathLocation.pos[2]
##
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": "获取了死亡点"}]
@@ -0,0 +1,7 @@
data modify storage fz:last_death fz.cache.pos set value [0, 0, 0]
##
data modify storage fz:installed fz.module.last_death set value 1b
##
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装组件:死亡点"}]
@@ -0,0 +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": "]"}]]
@@ -0,0 +1,7 @@
data remove storage fz:last_death fz
##
data modify storage fz:installed fz.module.last_death set value 0b
##
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载组件:死亡点"}]