 +            ChunkCoordinates spawnPoint = playerWorld.field_73011_w.getRandomizedSpawnPoint();
 +            p_72355_2_.func_70107_b(spawnPoint.field_71574_a, spawnPoint.field_71572_b, spawnPoint.field_71573_c);
 +        }
-+        
++
 +        p_72355_2_.func_70029_a(playerWorld);
          p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p);
          String s1 = "local";

         playerprofilecache.func_152649_a(gameprofile);
         NBTTagCompound nbttagcompound = this.func_72380_a(p_72355_2_);
-        p_72355_2_.func_70029_a(this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK));
+        
+        World playerWorld = this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK);
+        if (playerWorld==null)
+        {

         int j = p_72356_1_.field_71093_bK;
         WorldServer worldserver = this.field_72400_f.func_71218_a(p_72356_1_.field_71093_bK);
         p_72356_1_.field_71093_bK = p_72356_2_;
         WorldServer worldserver1 = this.field_72400_f.func_71218_a(p_72356_1_.field_71093_bK);
-        p_72356_1_.field_71135_a.func_147359_a(new S07PacketRespawn(p_72356_1_.field_71093_bK, p_72356_1_.field_70170_p.field_73013_u, p_72356_1_.field_70170_p.func_72912_H().func_76067_t(), p_72356_1_.field_71134_c.func_73081_b()));
+        p_72356_1_.field_71135_a.func_147359_a(new S07PacketRespawn(p_72356_1_.field_71093_bK, worldserver1.field_73013_u, worldserver1.func_72912_H().func_76067_t(), p_72356_1_.field_71134_c.func_73081_b())); // Forge: Use new dimensions information
         worldserver.func_72973_f(p_72356_1_);
         p_72356_1_.field_70128_L = false;
-        this.func_82448_a(p_72356_1_, j, worldserver, worldserver1);
