The dimension of @s is not updated when teleporting non-player entities
When running this function
execute at @s run setblock ~ ~ ~ green_concrete execute at @s in the_nether run tp @s ~ ~ ~ tellraw @a ["Dimension: ",{"nbt":"Dimension","entity":"@s"}] execute at @s run setblock ~ ~1 ~ red_concrete
using the following command from within the overworld:
/execute as @e[type=pig,distance=..3] run function dimensions:test
I'd expect to find a green concrete block in front of me and a red one in the nether. Instead, I see a stack of a green and red concrete block, even though the tellraw reports the pig being in dimension -1.
This does not happen, when a player is teleported instead of a pig: Then everything works as expected and a green block is placed in the overworld, and a red one in the nether.
2019-05-26, 02:02 PM
2023-08-23, 07:42 AM
15
11
-