Multiverse / Multiverse-NetherPortals

A Plugin for Multiverse-Core that handles the Notch style nether portals across multiple worlds.
BSD 3-Clause "New" or "Revised" License
79 stars 52 forks source link

[Bug]: Multiverse-NetherPortals linking Nether Portals incorrectly in 1.18.1 #244

Closed DJSorad closed 2 years ago

DJSorad commented 2 years ago

/mv version -p output

https://pastebin.com/7pShjDD1

Server logs

https://pastebin.com/7x6yE50Z

Server Version

This server is running Paper version git-Paper-101 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 464b171)
You are 31 version(s) behind
Download the new version at: https://papermc.io/downloads
Previous version: git-Paper-132 (MC: 1.17.1)

Bug Description

Nether portal data

Nether portal A in the overworld
    X: -750
    Y: 64
    Z: -518
Nether portal B in the Nether
    X: -114
    Y: 90
    Z: -3
Nether portal B converted to coords in the overworld (multiplied by 8)
    X: -912
    Y: 90
    Z: -24
Distances in each coords of Nether portal A and B in the overworld
    X: 912 - 750 = 162
    Y: 90 - 64 = 16
    Z: 518 - 24 = 494
Max cubic distance between portal A and B overworld locations
    sqrt(162^2 + 16^2 + 494^2) = 520.13
Teleports to Nether portal C in the overworld after stepping into Nether portal B
    X: -933
    Y: 74
    Z: -134

Behavior after MV on the same server

When stepping into portal A, it sends you to portal B (a portal generated in the nether from portal C). When stepping into portal B, it teleports to portal C. This issue is preventing multiple nether portals to be linked correctly.

Steps to reproduce

  1. Create a portal in the Overworld (Portal C)
  2. Step into Portal C to generate Portal B in the Nether.
  3. Step back into Portal B to return to Overworld.
  4. Create a new portal roughly 425.5 cubic distance apart (Portal A)
  5. Step into Portal A, this should generate a new portal in the Nether but instead teleports to Portal B in the Nether.
  6. Step into Portal B which takes you back to Portal C.

Agreements

jspv commented 2 years ago

Seeing exact same behavior; also running Paper 1.18.1 and both the stable and SNAPSHOT version of mv2 plugins.

hotrods20 commented 2 years ago

Same issue on 1.18.1 on latest release of MV2 plugin.

Jarada commented 2 years ago

Also experiencing this issue on 1.18.1 on latest release, though we do not have the Multiverse-NetherPortals plugin installed so it might be related directly to Multiverse Core. Click here for a related open issue on PaperMC that covers this and references Multiverse.

nicegamer7 commented 2 years ago

There are a couple issues open in the MV NetherPortals repo regarding this. However, I do believe this will end up being a Spigot bug (as it was when this was last reported). I was able to fix it last time so I'm going to investigate and see what I find.

edit: closed this by accident. reopening...

nicegamer7 commented 2 years ago

Couldn't reproduce it, although I don't doubt this bug exists. It would be helpful if someone could set up a world that exhibits this behaviour and send it here.

DJSorad commented 2 years ago

I have a world that is exhibiting this issue. Is there a way I can send it to you directly?

nicegamer7 commented 2 years ago

You could join our Discord server and send it to me in DMs.

Ghost-chu commented 2 years ago

I can reproduce this issue without Multiverse-Core but PhantomWorlds

nicegamer7 commented 2 years ago

That makes it more clear that this is not a Multiverse issue. Most likely a Spigot issue as I noted before.

jspv commented 2 years ago

Anyone know a workaround for this short of entirely disabling MV2? This breaks basic nether functionality and we've needed to disable MV (and thus all our non-main worlds) entirely.

berlincount commented 2 years ago

We're running into thte same issue.

This server is running Paper version git-Paper-152 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 78999b5)

Waterman1001 commented 2 years ago

We experience the same problem

This server is running Paper version git-Paper-177 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 2e99e5e)

[13:01:17 INFO]: [Multiverse-Core] Multiverse-Core Version: 4.3.2-SNAPSHOT-bUNKNOWN
[13:01:17 INFO]: [Multiverse-Core] Bukkit Version: git-Paper-177 (MC: 1.18.1)
[13:01:17 INFO]: [Multiverse-Core] Loaded Worlds: [{"MVWorld@484613093":{"Gen":"null","Type":"NORMAL","Env":"NETHER","Name":"Survival_nether"}}, {"MVWorld@187733061":{"Gen":"BentoBox","Type":"FLAT","Env":"NETHER","Name":"bskyblock_world_nether"}}, {"MVWorld@1945616936":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"SvestiGames"}}, {"MVWorld@153785098":{"Gen":"PlotSquared","Type":"NORMAL","Env":"NORMAL","Name":"CreativePlots"}}, {"MVWorld@1613325131":{"Gen":"BentoBox","Type":"FLAT","Env":"THE_END","Name":"bskyblock_world_the_end"}}, {"MVWorld@1623844951":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"SkyWarsLobby"}}, {"MVWorld@586877743":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"Survival"}}, {"MVWorld@1184888066":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"Spawn2"}}, {"MVWorld@1876216503":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"Dropper"}}, {"MVWorld@386535475":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"Minigames"}}, {"MVWorld@172152758":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"world"}}, {"MVWorld@587183079":{"Gen":"null","Type":"NORMAL","Env":"THE_END","Name":"world_the_end"}}, {"MVWorld@822606812":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"Creative"}}, {"MVWorld@157794248":{"Gen":"null","Type":"NORMAL","Env":"NETHER","Name":"world_nether"}}, {"MVWorld@1003893013":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"Spawn"}}, {"MVWorld@1640336743":{"Gen":"BentoBox","Type":"FLAT","Env":"NORMAL","Name":"bskyblock_world"}}]
[13:01:17 INFO]: [Multiverse-Core] Multiverse Plugins Loaded: 3
[13:01:17 INFO]: [Multiverse-Core] Economy being used: EssentialsX Economy
[13:01:17 INFO]: [Multiverse-Core] Permissions Plugin: Bukkit Permissions (SuperPerms)
[13:01:17 INFO]: [Multiverse-Core] Dumping Config Values: (version 2.9)
[13:01:17 INFO]: [Multiverse-Core] enforceaccess: false
[13:01:17 INFO]: [Multiverse-Core] prefixchat: false
[13:01:17 INFO]: [Multiverse-Core] prefixchatformat: [%world%]%chat%
[13:01:17 INFO]: [Multiverse-Core] useasyncchat: true
[13:01:17 INFO]: [Multiverse-Core] teleportintercept: true
[13:01:17 INFO]: [Multiverse-Core] firstspawnoverride: true
[13:01:17 INFO]: [Multiverse-Core] displaypermerrors: true
[13:01:17 INFO]: [Multiverse-Core] enablebuscript: false
[13:01:17 INFO]: [Multiverse-Core] globaldebug: 0
[13:01:17 INFO]: [Multiverse-Core] silentstart: false
[13:01:17 INFO]: [Multiverse-Core] messagecooldown: 5000
[13:01:17 INFO]: [Multiverse-Core] version: 2.9
[13:01:17 INFO]: [Multiverse-Core] firstspawnworld: Spawn2
[13:01:17 INFO]: [Multiverse-Core] teleportcooldown: 1000
[13:01:17 INFO]: [Multiverse-Core] defaultportalsearch: false
[13:01:17 INFO]: [Multiverse-Core] portalsearchradius: 16
[13:01:17 INFO]: [Multiverse-Core] autopurge: true
[13:01:17 INFO]: [Multiverse-Core] Special Code: FRN002
[13:01:17 INFO]: [Multiverse-Portals] Multiverse-Portals Version: 4.2.2-SNAPSHOT-b850
[13:01:17 INFO]: [Multiverse-Portals] Loaded Portals: 153
[13:01:17 INFO]: [Multiverse-Portals] Dumping Portal Values: (version 2.7)
[13:01:17 INFO]: [Multiverse-Portals] wand: 271
[13:01:17 INFO]: [Multiverse-Portals] useonmove: true
[13:01:17 INFO]: [Multiverse-Portals] portalsdefaulttonether: false
[13:01:17 INFO]: [Multiverse-Portals] enforceportalaccess: true
[13:01:17 INFO]: [Multiverse-Portals] portalcooldown: 400
[13:01:17 INFO]: [Multiverse-Portals] clearonremove: false
[13:01:17 INFO]: [Multiverse-Portals] framematerials: []
[13:01:17 INFO]: [Multiverse-Portals] Special Code: FRN001
[13:01:17 INFO]: [Multiverse-Inventories] Multiverse-Inventories Version: 4.2.3-SNAPSHOT-b521
[13:01:17 INFO]: [Multiverse-Inventories] === Settings ===
[13:01:17 INFO]: [Multiverse-Inventories] First Run: false
[13:01:17 INFO]: [Multiverse-Inventories] Using Bypass: false
[13:01:17 INFO]: [Multiverse-Inventories] Default Ungrouped Worlds: false
[13:01:17 INFO]: [Multiverse-Inventories] Save and Load on Log In and Out: false
[13:01:17 INFO]: [Multiverse-Inventories] Using GameMode Profiles: false
[13:01:17 INFO]: [Multiverse-Inventories] === Shares ===
[13:01:17 INFO]: [Multiverse-Inventories] Optionals for Ungrouped Worlds: true
[13:01:17 INFO]: [Multiverse-Inventories] Enabled Optionals:
[13:01:17 INFO]: [Multiverse-Inventories] === Groups ===
[13:01:17 INFO]: [Multiverse-Inventories] Survival_Opneem: {Worlds: [world, world_the_end, world_nether], Shares: [hit_points, economy, food_level, saturation, exhaustion, xp, total_xp, lvl, inventory_contents, armor_contents, bed_spawn, maximum_air, remaining_air, fall_distance, fire_ticks, potion_effects, last_location, ender_chest, off_hand]}
[13:01:17 INFO]: [Multiverse-Inventories] SurvivalWorld: {Worlds: [survival_nether, survival, survival_the_end], Shares: [hit_points, economy, food_level, saturation, exhaustion, xp, total_xp, lvl, inventory_contents, armor_contents, bed_spawn, maximum_air, remaining_air, fall_distance, fire_ticks, potion_effects, last_location, ender_chest, off_hand]}
[13:01:17 INFO]: [Multiverse-Inventories] SkyBlock: {Worlds: [bskyblock_world_nether, bskyblock_world], Shares: [hit_points, economy, food_level, saturation, exhaustion, xp, total_xp, lvl, inventory_contents, armor_contents, bed_spawn, maximum_air, remaining_air, fall_distance, fire_ticks, potion_effects, last_location, ender_chest, off_hand]}
[13:01:17 INFO]: [Multiverse-NetherPortals] Multiverse-NetherPortals Version: 4.2.2-SNAPSHOT-b805
[13:01:17 INFO]: [Multiverse-NetherPortals] Nether Prefix:
[13:01:17 INFO]: [Multiverse-NetherPortals] Nether Suffix: _nether
[13:01:17 INFO]: [Multiverse-NetherPortals] End Prefix:
[13:01:17 INFO]: [Multiverse-NetherPortals] End Suffix: _the_end
[13:01:17 INFO]: [Multiverse-NetherPortals] Nether Links: {Survival_nether=Survival, Survival=Survival_nether}
[13:01:17 INFO]: [Multiverse-NetherPortals] End Links: {Survival_the_end=Survival, Survival=Survival_the_end}
[13:01:17 INFO]: [Multiverse-NetherPortals] Bounceback: false
[13:01:17 INFO]: [Multiverse-NetherPortals] Teleport Entities: true
[13:01:17 INFO]: [Multiverse-NetherPortals] Send Disabled Portal Message: true
[13:01:17 INFO]: [Multiverse-NetherPortals] Send No Destination Message: false
[13:01:17 INFO]: [Multiverse-NetherPortals] Server Allow Nether: true
[13:01:17 INFO]: [Multiverse-NetherPortals] Server Allow End: true
[13:01:17 INFO]: [Multiverse-NetherPortals] Special Code: FRN001
JamesRagnarok commented 2 years ago

Paper just release build 185 (https://github.com/PaperMC/Paper/pull/7438#issue-1123466846) which fix some portal issue, but the others still persist. I have a vertical linking issue which breaks shulker farm, and can be reverted by removing Multiverse-NetherPortals (https://github.com/PaperMC/Paper/issues/6995#issuecomment-984870825).

berlincount commented 2 years ago

Further confirmation of bugginess from my end πŸ€·πŸΌβ€β™‚οΈ

Ghost-chu commented 2 years ago

Paper seems fixed it. https://github.com/PaperMC/Paper/commit/46ed080d3b6b6d2a5358cc13c050876ec3880bad

berlincount commented 2 years ago

Paper seems fixed it. PaperMC/Paper@46ed080

nope ... but the bug only seems to persist with Multiverse-NetherPortals ...

nicegamer7 commented 2 years ago

I'll explain why I don't believe it's an MV issue.

MV-NP is not in any way responsible for selecting which portal is "connected" to another. The only thing MV-NP does is convert coordinates from one world, to another world, and set the destination to that converted location. This conversion has not changed in 1.18. So while it's possible that this conversion is the cause of the issue, I find it highly unlikely due to nature of its simplicity.

However, I don't want to rule out MV as the cause prematurely, so I will debug tomorrow (if I have time 🀞) and make sure everything is working as expected on MV's side.

nicegamer7 commented 2 years ago

Didn't have time to test πŸ˜”.

From a quick glance though, I was slightly suspicious of the location scaling code. Here's a test build of MV-NP with that code changed. I don't expect it fix this issue, but if it does... nice lol.

Multiverse-NetherPortals-4.2.2-SNAPSHOT.zip

JamesRagnarok commented 2 years ago

Didn't have time to test πŸ˜”.

From a quick glance though, I was slightly suspicious of the location scaling code. Here's a test build of MV-NP with that code changed. I don't expect it fix this issue, but if it does... nice lol.

Multiverse-NetherPortals-4.2.2-SNAPSHOT.zip

A quick test with this snapshot fixed the issue on my server with Paper build 187. I'm going to create more worlds for further tests.

nicegamer7 commented 2 years ago

JamesRagnarok commented 2 years ago

This reminds me that one of my portal links was disrupted way back in 1.16 with MV. I moved that portal vertically for a few blocks and fixed that issue.

nicegamer7 commented 2 years ago

I suppose that makes sense now πŸ˜….

berlincount commented 2 years ago

It also seems to have addressed the problems on our server.