diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-06-10 03:50:04 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-10 03:52:50 -0400 |
commit | 6607b6785d74030234270b288821b166ed2735d2 (patch) | |
tree | 7100f6885ec61a77ec0b85e7cf75ad0c9ec005bb /src/main/java/net/minecraft/server | |
parent | ad95bf409540f39bf2a2788cee3c84856d2638fc (diff) | |
download | craftbukkit-6607b6785d74030234270b288821b166ed2735d2.tar craftbukkit-6607b6785d74030234270b288821b166ed2735d2.tar.gz craftbukkit-6607b6785d74030234270b288821b166ed2735d2.tar.lz craftbukkit-6607b6785d74030234270b288821b166ed2735d2.tar.xz craftbukkit-6607b6785d74030234270b288821b166ed2735d2.zip |
Fixed getting stuck in the ground when respawning to a bed under certain circumstances
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/ServerConfigurationManager.java | 8 |
1 files 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 3458ab6a..3a86026e 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))); |