我尝试用 此帖 的方法,跨维度将玩家 tp 到记分板指定的坐标,但是失败了。
已知记分板上的分数没有问题,请问该如何解决?
解决办法:
已知记分板上的分数没有问题,请问该如何解决?
代码:
- execute as @a at @s run function foo:main
代码:
- # function foo:main
- tag @s add self
- summon armor_stand ~ ~ ~ {Tags:["marker"]}
- teleport @e[tag=marker] ~ ~ ~ ~ ~
- execute as @e[tag=marker] run function foo:tp
- tag @s remove self
代码:
- #function foo:tp
- execute if score #d value matches 0 in overworld run teleport @s ~ ~ ~
- execute if score #d value matches -1 in the_nether run teleport @s ~ ~ ~
- execute if score #d value matches 1 in the_end run teleport @s ~ ~ ~
- execute store result entity @s Pos[0] double 0.01 run scoreboard players get #x value
- execute store result entity @s Pos[1] double 0.01 run scoreboard players get #y value
- execute store result entity @s Pos[2] double 0.01 run scoreboard players get #z value
- execute at @s run teleport @a[tag=self] @s
- kill @s
解决办法:
- 先给玩家加一个 tag,然后把玩家传送到另一个维度
- 用进度的 minecraft:changed_dimension 触发器检测拥有 tag 的玩家是否到达某个维度
- 移除玩家的 tag
- 在相同的维度里使用 Marker 传送
描述一下哪里失败了,最后marker还在吗?
不清楚先转维度后tp坐标会不会有影响,可以试试先tp到坐标在转维度
不清楚先转维度后tp坐标会不会有影响,可以试试先tp到坐标在转维度
盔甲架可以跨维度,玩家不行。
先转维度后 tp 坐标也没用。
直接tp,,,,,,,,