public virtual void SendPlayerToOtherDimension(net.minecraft.src.EntityPlayerMP entityplayermp
                                                       )
        {
            net.minecraft.src.WorldServer worldserver = mcServer.GetWorldServer(entityplayermp
                                                                                .dimension);
            int i = 0;

            if (entityplayermp.dimension == -1)
            {
                i = 0;
            }
            else
            {
                i = -1;
            }
            entityplayermp.dimension = i;
            net.minecraft.src.WorldServer worldserver1 = mcServer.GetWorldServer(entityplayermp
                                                                                 .dimension);
            entityplayermp.netServerHandler.SendPacket(new net.minecraft.src.Packet9Respawn
                                                           (unchecked ((byte)entityplayermp.dimension)));
            worldserver.RemovePlayer(entityplayermp);
            entityplayermp.isDead = false;
            double d  = entityplayermp.posX;
            double d1 = entityplayermp.posZ;
            double d2 = 8D;

            if (entityplayermp.dimension == -1)
            {
                d  /= d2;
                d1 /= d2;
                entityplayermp.SetLocationAndAngles(d, entityplayermp.posY, d1, entityplayermp.rotationYaw
                                                    , entityplayermp.rotationPitch);
                if (entityplayermp.IsEntityAlive())
                {
                    worldserver.UpdateEntityWithOptionalForce(entityplayermp, false);
                }
            }
            else
            {
                d  *= d2;
                d1 *= d2;
                entityplayermp.SetLocationAndAngles(d, entityplayermp.posY, d1, entityplayermp.rotationYaw
                                                    , entityplayermp.rotationPitch);
                if (entityplayermp.IsEntityAlive())
                {
                    worldserver.UpdateEntityWithOptionalForce(entityplayermp, false);
                }
            }
            if (entityplayermp.IsEntityAlive())
            {
                worldserver1.AddEntity(entityplayermp);
                entityplayermp.SetLocationAndAngles(d, entityplayermp.posY, d1, entityplayermp.rotationYaw
                                                    , entityplayermp.rotationPitch);
                worldserver1.UpdateEntityWithOptionalForce(entityplayermp, false);
                worldserver1.chunkProviderServer.chunkLoadOverride = true;
                (new net.minecraft.src.PortalTravelAgent()).SetExitLocation(worldserver1, entityplayermp
                                                                            );
                worldserver1.chunkProviderServer.chunkLoadOverride = false;
            }
            Func_28172_a(entityplayermp);
            entityplayermp.netServerHandler.TeleportTo(entityplayermp.posX, entityplayermp
                                                       .posY, entityplayermp.posZ, entityplayermp.rotationYaw, entityplayermp.rotationPitch
                                                       );
            entityplayermp.SetWorldHandler(worldserver1);
            Func_28170_a(entityplayermp, worldserver1);
            Func_30008_g(entityplayermp);
        }