From 75a40177ec301a5eef94f6e384bd85cd8689d70d Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 17 Apr 2012 08:47:22 -0700 Subject: [PATCH] Respawning in dimensions should now properly set the dimension ID for the new player instance. --- .../src/ServerConfigurationManager.java.patch | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/forge/patches/minecraft_server/net/minecraft/src/ServerConfigurationManager.java.patch b/forge/patches/minecraft_server/net/minecraft/src/ServerConfigurationManager.java.patch index 006b0bdf3..20dd44dde 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/ServerConfigurationManager.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/ServerConfigurationManager.java.patch @@ -62,7 +62,15 @@ } /** -@@ -289,6 +294,10 @@ +@@ -245,6 +250,7 @@ + var5.copyPlayer(par1EntityPlayerMP); + } + ++ var5.dimension = par2; + var5.entityId = par1EntityPlayerMP.entityId; + var5.playerNetServerHandler = par1EntityPlayerMP.playerNetServerHandler; + WorldServer var6 = this.mcServer.getWorldManager(par1EntityPlayerMP.dimension); +@@ -289,6 +295,10 @@ */ public void sendPlayerToOtherDimension(EntityPlayerMP par1EntityPlayerMP, int par2) { @@ -73,7 +81,7 @@ int var3 = par1EntityPlayerMP.dimension; WorldServer var4 = this.mcServer.getWorldManager(par1EntityPlayerMP.dimension); par1EntityPlayerMP.dimension = par2; -@@ -296,33 +305,14 @@ +@@ -296,33 +306,14 @@ par1EntityPlayerMP.playerNetServerHandler.sendPacket(new Packet9Respawn(par1EntityPlayerMP.dimension, (byte)par1EntityPlayerMP.worldObj.difficultySetting, var5.getWorldInfo().getTerrainType(), var5.getHeight(), par1EntityPlayerMP.itemInWorldManager.getGameType())); var4.removePlayer(par1EntityPlayerMP); par1EntityPlayerMP.isDead = false; @@ -113,7 +121,7 @@ { ChunkCoordinates var12 = var5.getEntrancePortalLocation(); var6 = (double)var12.posX; -@@ -342,7 +332,7 @@ +@@ -342,7 +333,7 @@ par1EntityPlayerMP.setLocationAndAngles(var6, par1EntityPlayerMP.posY, var8, par1EntityPlayerMP.rotationYaw, par1EntityPlayerMP.rotationPitch); var5.updateEntityWithOptionalForce(par1EntityPlayerMP, false); var5.chunkProviderServer.chunkLoadOverride = true; @@ -122,7 +130,7 @@ var5.chunkProviderServer.chunkLoadOverride = false; } -@@ -372,9 +362,9 @@ +@@ -372,9 +363,9 @@ this.sendPacketToAllPlayers(new Packet201PlayerInfo(var1.username, true, var1.ping)); } @@ -134,7 +142,7 @@ } } -@@ -907,7 +897,7 @@ +@@ -907,7 +898,7 @@ public String[] func_52019_t() {