Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-152997

The dimension of @s is not updated when teleporting non-player entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.14.2 Pre-Release 4, Minecraft 1.14.3, 1.15.2, 1.16 Pre-release 4, 1.16.2, 1.16.4, 20w45a, 20w49a, 21w03a, 1.18.2, 23w33a
    • Confirmed
    • Commands
    • Normal
    • Platform

      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.

            Unassigned Unassigned
            J_Aetherwing J_Aetherwing
            Votes:
            15 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              CHK: