If a shulker is unable to find a valid attachment location in its first tick after traveling through a portal (tested with Nether portals and End portals), it will keep its attached block data from the previous dimension and appear at the previous dimension coordinates (explanation obtained from
MC-139265 and verified with /data commands). Thus, shulkers sent through portals will often appear over a hundred blocks away from the portal in the new dimension.
For example, a shulker is sent through a nether portal from the overworld at (240, 65, 238) to a portal in the nether at (30, 70, 30). When it arrives at the Nether side, it fails to find a valid block to attach to in its first tick, so it is re-positioned to align with its attached block data from the overworld, causing it to be in the Nether at (240, 65, 238), over 300 blocks away from the portal it should appear near.
The command "/execute at @e[type=minecraft:shulker] run tp <your player name> ~ ~ ~" is useful for locating wrongly positioned shulkers if they are still in loaded chunks. Setting up a repeat command block with that command in a chunk that will stay loaded and spawning a shulker in a Nether portal will allow you to follow the path of the shulker as it moves into the Nether/overworld. When using this method, this is what I found when teleporting a shulker to the Overworld from the Nether:
Shulker transport to the Nether and back appears to work as it should before 1.14 (tested in 1.13.2). See https://www.youtube.com/watch?v=P25DK1cm74M&t=822s for evidence it was an issue (though slightly different and primarily with end portals) in 1.12.
How to reproduce
(Step 2 not necessary, but recommended)
- Build a Nether portal in a release after 1.14 for the bug in its current state
(or in 1.13.2 for the proper behavior).
- To prevent the shulker from teleporting to a nearby open block once it goes through the portal, build the receiving portal at least 17 blocks from any solid block face and cover all the solid faces within 17 blocks with buttons.
- Use a piston to push a shulker through the portal or spawn a shulker in the portal. You may need to repeat this step several times.
- is duplicated by
MC-171954 Shulkers won't change dimensions
MC-176399 Shulker teleports to its nether coordinates when travelling to the Overworld
MC-194121 Shulkers don't use nether portals correctly
MC-202267 Shulkers and portals don't work well together
MC-203891 Shulkers going through a nether portal without a valid teleportation spot would ignore dimension scaling, and would remain in the coordinates of their previous dimension.
- relates to
MC-139265 Shulkers do not teleport correctly when going through a portal
- testing discovered
MC-212149 Shulker is sometimes mis-rotated when player teleports through a nether portal and reloading an active chunk with Shulker