From 6607b6785d74030234270b288821b166ed2735d2 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Fri, 10 Jun 2011 03:50:04 -0400 Subject: [PATCH] Fixed getting stuck in the ground when respawning to a bed under certain circumstances --- .../net/minecraft/server/ServerConfigurationManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index 3458ab6afc..3a86026e63 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -214,13 +214,13 @@ public class ServerConfigurationManager { // CraftBukkit start EntityPlayer entityplayer1 = entityplayer; - + if (location == null) { CraftWorld cw = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld); if(cw != null && chunkcoordinates != null) { ChunkCoordinates chunkcoordinates1 = EntityHuman.getBed(cw.getHandle(), chunkcoordinates); if (chunkcoordinates1 != null) { - location = new Location(cw, chunkcoordinates1.x + 0.5, chunkcoordinates1.y + 0.1, chunkcoordinates1.z + 0.5); + location = new Location(cw, chunkcoordinates1.x + 0.5, chunkcoordinates1.y, chunkcoordinates1.z + 0.5); } else { entityplayer1.netServerHandler.sendPacket(new Packet70Bed(0)); } @@ -243,13 +243,13 @@ public class ServerConfigurationManager { WorldServer worldserver = ((CraftWorld)location.getWorld()).getHandle(); entityplayer1.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // CraftBukkit end - + worldserver.chunkProviderServer.getChunkAt((int) entityplayer1.locX >> 4, (int) entityplayer1.locZ >> 4); while (worldserver.getEntities(entityplayer1, entityplayer1.boundingBox).size() != 0) { entityplayer1.setPosition(entityplayer1.locX, entityplayer1.locY + 1.0D, entityplayer1.locZ); } - + // CraftBukkit start byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId()); entityplayer1.netServerHandler.sendPacket(new Packet9Respawn((byte) (actualDimension >= 0 ? -1 : 0)));