Multiverse-Core: [1.16.4] Nether portals doesn't see the corresponding portal in overworld

Information

Details

Description
Nether portals in nether spawns new portal in overworld instead of using existing one, which was used to enter the nether.

Steps to reproduce

  1. Make a nether portal anywhere in the world. (Original-Overworld)
  2. Go to the nether (it will create a portal, Generated-Nether)
  3. Go back to overworld
  4. Destroy Original-Overworld portal and build a new one in (Shifted-Overworled) some distance, but within vanilla search radius (1024 for overworld)
  5. Go through Shifted-Overworled portal. You will find yourself in Generated-Nether portal.
  6. Step out and back into Generated-Nether portal
  7. Now the problem is:

Expected behavior
You’ll spawn in Shifted-Overworled

Feal behavior The game creates new portal in overworld instead

Screenshots
A portal in overworld, linked to portal in nether 2020-12-21_19 25 45

A nether portal, to wich first portal is linked 2020-12-21_19 25 50

A new portal, generated when returning from th nether 2020-12-21_19 26 03

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 38 (17 by maintainers)

Most upvoted comments

Paper Build 468 includes the fix.

Sorry this took a while to get fixed.

I found the problem. The problem is that by default, any nether portal that is not in the main nether world will have the main nether world as its destination. So the problem is that since the server originally thinks the portal is going to the main nether world, it reduces the search radius to 16 (128 / 8), but it does not take into account that the world may change after the event propagates. I have an idea which I will propose to Spigot on how to fix this.

edit: Here it is. I tested this change and it has indeed solved the problem, https://hub.spigotmc.org/jira/browse/SPIGOT-6347.

I am providing a custom Paper build here with one added patch. The added patch simply makes the server send nether portals to the overworld when you are in any nether world. The previous behaviour is to only send a nether portal to the overworld if you are in the main nether world. This build will fix this issue and it’s up to date with Paper Build 467.

It’s too large to upload here or to upload to Discord, so I’ve uploaded it to Google Drive (fixed in CraftBukkit).

There is only a coordinate conversion in MV NetherPortals, https://github.com/Multiverse/Multiverse-NetherPortals/blob/main/src/main/java/com/onarandombox/MultiverseNetherPortals/utils/MVLinkChecker.java.

But this seems correct to me.

Yes, it is actually what I was writing about. The only thing MV does - it rescale coordinates, but finding the portal isn’t changed, it’s already done in spigot event. So this issue shoul be forwarded to spigot.