mojira.dev

FlesyZ

Assigned

No issues.

Reported

Comments

I also tested the teleport command in different coordination.

Example 4:

// example_4a.mcfunction
tp @s ~3 ~ ~
tp @s ~ ~3 ~
tp @s ~ ~ ~3
// example_4a.mcfunction
tp @s ~3 ~ ~
tp @s ~ ~3 ~
tp @s ~ ~ ~3

Expected: Player is teleported 3 blocks east, 3 blocks south and 3 blocks up from the previous position.

Actual: Player is teleported 3 blocks east, 3 blocks south and 3 blocks down.

// example_4b.mcfunction
tp @s ~ ~3 ~
tp @s ~3 ~ ~
tp @s ~ ~ ~3
// example_4b.mcfunction
tp @s ~ ~3 ~
tp @s ~3 ~ ~
tp @s ~ ~ ~3

Expected: Should be the same expectation.

Actual: Player is teleported 3 blocks west, 3 blocks south and 3 blocks up.

// example_4c.mcfunction
tp @s ~3 ~ ~
tp @s ~ ~3 ~
tp @s ~ ~ ~3
tp @s ~ ~ ~3
// example_4c.mcfunction
tp @s ~3 ~ ~
tp @s ~ ~3 ~
tp @s ~ ~ ~3
tp @s ~ ~ ~3

Expected: Player is teleported 3 blocks east, 6 blocks south and 3 blocks up from the previous position.

Actual: Player is teleported 3 blocks west, 3 blocks up, and 3 blocks south and north

In Example 4, this bug is confirmed.

 

Example 5:

// example_5a.mcfunction
tp @s ~3 ~ ~
execute at @s run tp @s ~ ~3 ~
execute at @s run tp @s ~ ~ ~3
// example_5a.mcfunction
tp @s ~3 ~ ~
execute at @s run tp @s ~ ~3 ~
execute at @s run tp @s ~ ~ ~3

This works as expected, but if I try to catch the position:

// example_5b.mcfunction
tp @s ~3 ~ ~
tellraw @a [ "1-a: ", {"nbt": "Pos[0]", "entity": "@s"}, ", ", {"nbt": "Pos[1]", "entity": "@s"}, ", ", {"nbt": "Pos[2]", "entity": "@s"} ]
execute at @s run tp @s ~ ~3 ~
tellraw @a [ "1-a: ", {"nbt": "Pos[0]", "entity": "@s"}, ", ", {"nbt": "Pos[1]", "entity": "@s"}, ", ", {"nbt": "Pos[2]", "entity": "@s"} ]
execute at @s run tp @s ~ ~ ~3
execute at @s run tellraw @a [ "1-a: ", {"nbt": "Pos[0]", "entity": "@s"}, ", ", {"nbt": "Pos[1]", "entity": "@s"}, ", ", {"nbt": "Pos[2]", "entity": "@s"} ]
// example_5b.mcfunction
tp @s ~3 ~ ~
tellraw @a [ "1-a: ", {"nbt": "Pos[0]", "entity": "@s"}, ", ", {"nbt": "Pos[1]", "entity": "@s"}, ", ", {"nbt": "Pos[2]", "entity": "@s"} ]
execute at @s run tp @s ~ ~3 ~
tellraw @a [ "1-a: ", {"nbt": "Pos[0]", "entity": "@s"}, ", ", {"nbt": "Pos[1]", "entity": "@s"}, ", ", {"nbt": "Pos[2]", "entity": "@s"} ]
execute at @s run tp @s ~ ~ ~3
execute at @s run tellraw @a [ "1-a: ", {"nbt": "Pos[0]", "entity": "@s"}, ", ", {"nbt": "Pos[1]", "entity": "@s"}, ", ", {"nbt": "Pos[2]", "entity": "@s"} ]

Expected: Pos[] follows the player. If players is teleported 3 blocks up, Pos[] is also 3 blocks up from the previous position,
Actual: Pos[] is twice as far as the actual position of the player, and it doesn't change with execute at @s run heading.

In Example 5, we can know that the position caught gets twice as far as expected after teleport commands in a function.