TwelveIterationMods / NetherPortalFix

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

RespawnPacket being sent to client with wrong data #16

Closed bloodmc closed 7 years ago

bloodmc commented 7 years ago

https://github.com/blay09/NetherPortalFix/blob/1.12/src/main/java/net/blay09/mods/netherportalfix/NetherPortalFix.java#L113

As you can see on this line, you are sending a packet with source world rather than target. The player's world object wouldn't have changed by this point.

The correct line should be

player.connection.sendPacket(new SPacketRespawn(player.dimension, newWorld.getDifficulty(), newWorld.getWorldInfo().getTerrainType(), player.interactionManager.getGameType()));