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

Shulkers do not teleport correctly when going through a portal

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.13.2, Minecraft 18w45a, 20w08a
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      When pushed via piston from the end to the overworld, shulkers occasionally appear around the world spawn (intended behaviour) or more likely around world (0,64,0) (incorrect behaviour).

      What happens:

      Shulkers track their position via "attached block" NBT that is copied when a shulker is moved from the end to the overworld. So if it is attached to like (1,64,0) in the end, it will appear in the overworld at world spawn, but with NBT of attached block copied from the end as (1,64,0). If the shulker manages to find a suitable location in his first tick in the overworld, it modifies its "attached block" tag and stays around world spawn. Otherwise next tick its position is reset  accordingly to the "attached block in the end":

      Proof:
      Couple log files of several shulkers pushed via end portal to the overworld:

      [17:44:18] [Server thread/INFO]: gnembon joined the game
       [17:44:20] [Server thread/INFO]: Scanning for legacy world dragon fight...
       [17:44:20] [Server thread/INFO]: Found that the dragon has been killed in this world already.
       [17:44:43] [Server thread/ERROR]: 
       [17:44:43] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:the_end on tick 518
       [17:44:43] [Server thread/ERROR]: - failed to teleport
       [17:44:43] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:43] [Server thread/ERROR]: MOVED TO OVERWORLD to world spawn at BlockPos{x=52, y=68, z=77} on tick 518
       [17:44:43] [Server thread/ERROR]: 
       [17:44:43] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 519
       [17:44:43] [Server thread/ERROR]: - failed to teleport
       [17:44:43] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:43] [Server thread/ERROR]: 
       [17:44:43] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 519
       [17:44:43] [Server thread/ERROR]: - failed to teleport
       [17:44:43] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:43] [Server thread/ERROR]: 
       [17:44:43] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 520
       [17:44:43] [Server thread/ERROR]: - failed to teleport
       [17:44:43] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:43] [Server thread/ERROR]: 
       [17:44:43] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 520
       [17:44:43] [Server thread/ERROR]: - successfully moved to BlockPos{x=-4, y=65, z=6}
       [17:44:43] [Server thread/ERROR]: - attached block NBT: BlockPos{x=-4, y=65, z=6}
       [17:44:47] [Server thread/ERROR]: 
       [17:44:47] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:the_end on tick 595
       [17:44:47] [Server thread/ERROR]: - failed to teleport
       [17:44:47] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:47] [Server thread/ERROR]: MOVED TO OVERWORLD to world spawn at BlockPos{x=52, y=68, z=77} on tick 595
       [17:44:47] [Server thread/ERROR]: 
       [17:44:47] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 596
       [17:44:47] [Server thread/ERROR]: - failed to teleport
       [17:44:47] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:47] [Server thread/ERROR]: 
       [17:44:47] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 596
       [17:44:47] [Server thread/ERROR]: - failed to teleport
       [17:44:47] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:47] [Server thread/ERROR]: 
       [17:44:47] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 597
       [17:44:47] [Server thread/ERROR]: - successfully moved to BlockPos{x=-7, y=63, z=5}
       [17:44:47] [Server thread/ERROR]: - attached block NBT: BlockPos{x=-7, y=63, z=5}
       [17:44:47] [Server thread/ERROR]: 
       [17:44:47] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 597
       [17:44:47] [Server thread/ERROR]: - failed to teleport
       [17:44:47] [Server thread/ERROR]: - attached block NBT: BlockPos{x=-7, y=63, z=5}
       [17:44:50] [Server thread/ERROR]: 
       [17:44:50] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:the_end on tick 655
       [17:44:50] [Server thread/ERROR]: - failed to teleport
       [17:44:50] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:50] [Server thread/ERROR]: MOVED TO OVERWORLD to world spawn at BlockPos{x=52, y=68, z=77} on tick 655
       [17:44:50] [Server thread/ERROR]: 
       [17:44:50] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 656
       [17:44:50] [Server thread/ERROR]: - failed to teleport
       [17:44:50] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:50] [Server thread/ERROR]: 
       [17:44:50] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 656
       [17:44:50] [Server thread/ERROR]: - failed to teleport
       [17:44:50] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:50] [Server thread/ERROR]: 
       [17:44:50] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 657
       [17:44:50] [Server thread/ERROR]: - successfully moved to BlockPos{x=-7, y=63, z=3}
       [17:44:50] [Server thread/ERROR]: - attached block NBT: BlockPos{x=-7, y=63, z=3}
       [17:44:50] [Server thread/ERROR]: 
       [17:44:50] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 657
       [17:44:50] [Server thread/ERROR]: - successfully moved to BlockPos{x=-3, y=63, z=-6}
       [17:44:50] [Server thread/ERROR]: - attached block NBT: BlockPos{x=-3, y=63, z=-6}
       [17:44:53] [Server thread/ERROR]: 
       [17:44:53] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:the_end on tick 716
       [17:44:53] [Server thread/ERROR]: - failed to teleport
       [17:44:53] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:53] [Server thread/ERROR]: MOVED TO OVERWORLD to world spawn at BlockPos{x=52, y=68, z=77} on tick 716
       [17:44:53] [Server thread/ERROR]: 
       [17:44:53] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 717
       [17:44:53] [Server thread/ERROR]: - failed to teleport
       [17:44:53] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:53] [Server thread/ERROR]: 
       [17:44:53] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=52, y=68, z=77} in minecraft:overworld on tick 717
       [17:44:53] [Server thread/ERROR]: - failed to teleport
       [17:44:53] [Server thread/ERROR]: - attached block NBT: BlockPos{x=1, y=64, z=0}
       [17:44:53] [Server thread/ERROR]: 
       [17:44:53] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 718
       [17:44:53] [Server thread/ERROR]: - successfully moved to BlockPos{x=2, y=65, z=-1}
       [17:44:53] [Server thread/ERROR]: - attached block NBT: BlockPos{x=2, y=65, z=-1}
       [17:44:53] [Server thread/ERROR]: 
       [17:44:53] [Server thread/ERROR]: Trying to teleport, currently at BlockPos{x=1, y=64, z=0} in minecraft:overworld on tick 718
       [17:44:53] [Server thread/ERROR]: - failed to teleport
       [17:44:53] [Server thread/ERROR]: - attached block NBT: BlockPos{x=2, y=65, z=-1}

      Notice inconsistencies between entity position and NBT of attached block

      Solution: fix "attached block" to world spawn point when changing dimension to reflect position change.

      How to reproduce

      1. In the Overworld place a block at around (0,64,0)
      2. Set the world spawn at a different location
        /setworldspawn
        
      3. Go to the End
      4. Push multiple shulkers into the exit portal using pistons (downwards facing next to center pillar with torches)
      5. Go to the Overworld
        The shulkers are around (0,64,0) instead of were the world spawn is

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gnembon Gnembon
              • Votes:
                6 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: