TwelveIterationMods / NetherPortalFix

Minecraft Mod. Ensures correct destinations when travelling back and forth through Nether Portals in Multiplayer.
https://mods.twelveiterations.com/mc/netherportalfix/
Other
18 stars 11 forks source link

[1.16.x and lower] (server issues) suffocation damage + infinite warp + wrong co-ords. #36

Closed Ruchian closed 2 years ago

Ruchian commented 4 years ago

Minecraft 1.15.2 Forge 31.2.0 NetherPortalFix 6.0.2

Suffocation damage: (Dedicated Server only) When a player travels to the nether they take half a heart of Suffocation damage.

I noticed that the player will always arrive in the same block space when travelling to and from the nether portal. This is fixed by whoever created the portal first. This maybe related. (Can diffidently be confirmed when the client and server are running on the same machine. It always happens, so long the player is in survival mode)

Infinite warp loop: (Dedicated server only) When a player has latency issues between the client and server. They may travel back and forth between portals consistently and thus get stuck. (this can be confirmed with difficulty when the client and server are on the same machine. You'd need to create artificial latency (for example, by removing the nether forcing your pc to generate it).)

19 maybe related.

Wrong location: (dedicated server only) Sometimes, when there is enough latency around, the player will warp to overworld coordinates in the Nether. This will most diffidently happen if for some reason the player disconnects while trying to travel to the nether. I realized while your mod is active this also happens when players travel to the End through the regular minecraft portal (and disconnect), even if they threw in None Player entities before hand. (such as animals or other mobs). In case of the Nether, one may land in lava. In case of the End, one will fall into the void. (try d/cing as you warp somehow xd)

I and other players first discovered the issues while playing on the following modpack: https://www.curseforge.com/minecraft/modpacks/really-awesome-mods/files (pack version 0.4.4, it uses forge 31.2.27 and the same netherportalfix mod) on a dedicated server run on Nodecraft.

tobi-polar commented 4 years ago

Could this be what's causing me to suffocate to death when using YAMDA portals on 1.15.2? https://www.curseforge.com/minecraft/mc-mods/yamda/files

Ruchian commented 4 years ago

All I can tell you is that the above mentioned issues are likely caused by the same thing, namely the order of events. First your player gets teleported to the dimension, after that they get teleported again to the specified co-ordinated grabbed from the list (of stored portal co-ordinates) to teleport the player to the correct portal. If you have sufficient lag, then Minecraft thinks you just stepped into the portal frame, cauing you to teleport back to the overworld where due to the overwritten method the same thing happens, causing you to teleport back.

As to why it happens this way, its because the chunk where the portal is is loaded regularly. The chunk with the portal gets loaded in by minecraft because for everything else (regular entities, npcs, mobs, etc.) it still uses the old netherportal method. The portal chunk is as such loaded in before the player arrives through the second teleport.

If for some reason it fails to teleport you to the stored co-ords (for example, like I mentioned in June, when you disconnect due to latency), you're only changing dimension without changing co-ords, causing you to in the end for example fall into the void or in the nether fall in lava if not suffocate completely.

Anyway, because the player is teleported to the exact co-ords where the player was in the previous dimension when they change dimension, they often arrive in a wall momentarily before they teleport to the portal, causing a tick of suffocation damage.

(also, excuse me for the late reply. I rarely check my email, since lack of contacts)

YAMDA is buggy. It's possible though. I can't say to be honest. YAMDA has a client\server glitch issue that I also mentioned on YAMDA's git. It creates a block that isn't there on the server (a fake block) when you warp.

Edit: A perhaps safer way to teleport is by teleporting to the co-ords in the active dimension first before teleporting to the next dimension. Though I can't say this will fix all issues. Loading in an unloaded dimension can cause more lag than just teleporting to a different set of co-ordinates in the current dimension. It won't fix the suffocation issue though. At least I think you need to rethink how you want to work out the teleport mechanic to ensure the player arrives at the right destination (if possible instantly).

HarouIshi commented 3 years ago

This issue is also occurring on Minecraft Version 1.16.3.

To further add to these issues already described, entering the Nether Portal has a tendency to disconnect me from my friends private server where it is installed both client and server side, and upon returning it shows that I have died between being timed out, to rejoining, with my items appearing somewhere in the overworld.

AfterRebelion commented 3 years ago

Confirmed for NetherPortalFix_1.16.3-7.2.1 on a dedicated server, confirmed that in singleplayer it works without issues

After reading about the issue, it seems like this mod reintroduces MC-98153 When traveling through a portal, it momentariely teleports the player to the same coordinates in the nether, and they receive the damage related to this block (In my case, I received lava damage + fire effect, as the location had a lava block)

Will edit this message when more analysis is done.

TheMightyMcGrew commented 3 years ago

Confirming that players on our server are taking suffocation damage from portals, even made giant portals that have no solid blocks to take damage from on entry. Some players are dying to this becuase of their ping, some get stuck in some weird infinite loop of going back and forth between the overworld and nether until they die or crash.

Nincodedo commented 3 years ago

We're also having this issue on a hardcore world so we removed the mod for the time being.

sheakelso commented 3 years ago

I am having this same issue, however, when attempting to remove the mod, some 'Biomes You'll Go' biomes, kinda turn into the nether? And I literally had a ghast spawn at my base. Not fun. Any ideas?

AfterRebelion commented 2 years ago

As there has been no updates on this, i decided to try the minimalist approach. Created a test void world, with 2 portals near (0, 0), one with red terracota, and another one with green terracota. Both link to the same portal in the nether.

TST-VOID-1.16.5.zip

If you enter the green portal, nothing happens, however if you enter on the red portal, you will receive fire damage. This is due to the 2 lava blocks in the nether that are in the same coordinates as the portal in the overworld. The player is temporarely teleported to this blocks before teleporting to the real location.

As mentioned earlier, this was also an issue in vanilla, that got eventually fixed: https://bugs.mojang.com/browse/MC-98153

(Note: In my testing I had to force block updates in the lava for it to "work" (Removing the lava and placing it again) in singleplayer. In dedicated server this might not be necessary, as the error there is pretty consistent)

MaxWasUnavailable commented 2 years ago

Having the same issues.

It's also generating new portals sometimes when passing through a portal.

pPkMnh4to8994h commented 2 years ago

Same nether loop issue. For whatever reason, this mod removes teleport block if you did not exist portal upon arrival, allowing this problem to happen.

BlayTheNinth commented 2 years ago

The 1.17 port rewrote the portal handling to be closer to Vanilla which should fix all these issues. I might backport it to 1.16 depending on how fast 1.18 gets adopted.

BlayTheNinth commented 2 years ago

Closing since it has been fixed in 1.17+