mojira.dev
MC-168900

Shulkers teleport with original dimension coordinates after passing through portals

The bug

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:

[media]

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)

  1. 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).

  2. 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.

  3. 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.

[media][media]

Linked issues

Attachments

Comments 12

Still an issue in 20w08a

This is almost certainly a duplicate/combination of MC-139265 and MC-176399

I'm in 1.15.2 - this is still an issue. I was going crazy trying to find out why my shulkers weren't coming to the overworld - I saw this post another one about the same problem, I checked the coordinates of the end portal in the overworld, and it was there. Thank you so much because I really don't think I would have found the shulker.

Can confirm for 1.16.4 and 20w45a.

2 more comments

There are a few issues with your response, in option 2 you mentioned that block updates should intiate the search, however block updates only send updates to blocks immediately ajacent to them. Which means unless the shulker is right next to the block update there is no way to implement this than to have the shulker deliberately search for block updates within the 17x17x17 cube every gametick.

A deterministic search would mean that instead of searching 5 spaces every gametick, the shulker would eventually have to search 4913 spaces which would tank performance. The current behaviour of searching 5 random positions every gametick if the shulker is in an invalid position is quite well optimized.

Also I have observed the random behaviour when going through portals, the most optimized layout you can have has a 50% chance for the shulker to find a space each attempt. Repeating attempts 5 times in a row and the probability of a shulker not finding a space drops to about 1.2%. So out of 1000 shulkers you could expect to get 12 of them appearing at the same coordinates instead of going through the portal.

In hindsight it might be easier to manage shulkers if this behaviour was patched as portal linking would make them all appear in the same space, so for the shulker farm you wouldn't need a massive collection platform in the nether. But this mechanic is also very useful for populating mobswitches as you don't need a portal in the middle of your mobswitch that you can't get near to remove.

Yeah, I was concerned about the deterministic method's performance, but I thought there might be ways to mitigate it. Perhaps if it was able to be spread over multiple ticks, that could reduce the impact, but then of course, that would require extra data fields to save the search's progress. Alternatively, as most inexperienced players sending a shulker through a portal would expect it to appear near the front or back, a deterministic search over a small region in front and back could be used if the normal placing method doesn't work after going through a portal.

Likewise, I can see the issue with block updates. I wasn't positive how the entity AI's keep track of blocks around them, so I was just throwing out ideas.

I can also see the benefits of the current behavior, the main issue I see is that inexperienced players trying to get into technical minecraft will likely not have an optimized layout for shulker attachment, so a notably larger percent of the shulkers could be lost. Of course, once renewable shulkers are in a major release, that loss will not be as frustrating as it would be in the current release.

I propose the mechanics should work exactly as they are now, except if going from overworld to nether and the teleport checks fail, the X and Z coordinates are divided by 8, instead of staying the same as the overworld. Likewise, if going from nether to overworld, the coordinates would multiply by 8. Thus, the shulkers would be guaranteed to stay close to the portal, like every other entity.

Please note that the comment section on the bug tracker is not for discussing bugs, but it is for adding missing information to the ticket. If you wish to discuss this, feel free to create a thread on /r/Mojira or initiate a discussion on our Discord server.

After reflecting on this issue I found that it would really stink to have to travel thousands of blocks in the nether to get to the nether side of one of the new shulker farms. Therefore I think this should be fixed even though it was quite useful for transporting them large distances, this is a very niche application and carries more negatives than positives.

Philip Cooper

(Unassigned)

Confirmed

Mob behaviour

mob, portal, shulker, world

1.15.1, 1.15.2, 20w08a, 20w14a, 20w15a, ..., 1.16.2, 1.16.3, 1.16.4, 20w45a, 20w51a

21w03a

Retrieved