diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java index 7a2cea9984..1aacf9f900 100644 --- a/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java @@ -134,7 +134,7 @@ public class BlockFlowing extends BlockFluids { } // CraftBukkit start - all four cardinal directions. Do not change the order! - BlockFace[] faces = new BlockFace[] { BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST }; + BlockFace[] faces = new BlockFace[] { BlockFace.WEST, BlockFace.EAST, BlockFace.SOUTH, BlockFace.NORTH }; int index = 0; for (BlockFace currentFace : faces) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 50d4834c61..f14a833534 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -634,13 +634,13 @@ public abstract class Entity { org.bukkit.block.Block block = this.world.getWorld().getBlockAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY - (double) this.height), MathHelper.floor(this.locZ)); if (d6 > d0) { - block = block.getRelative(BlockFace.SOUTH); - } else if (d6 < d0) { - block = block.getRelative(BlockFace.NORTH); - } else if (d8 > d2) { - block = block.getRelative(BlockFace.WEST); - } else if (d8 < d2) { block = block.getRelative(BlockFace.EAST); + } else if (d6 < d0) { + block = block.getRelative(BlockFace.WEST); + } else if (d8 > d2) { + block = block.getRelative(BlockFace.NORTH); + } else if (d8 < d2) { + block = block.getRelative(BlockFace.SOUTH); } VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, block); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftEffect.java b/src/main/java/org/bukkit/craftbukkit/CraftEffect.java index 9a96e53549..7de0de5e19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftEffect.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftEffect.java @@ -18,7 +18,7 @@ public class CraftEffect { datavalue = ((Material) data).getId(); break; case SMOKE: - switch((BlockFace)data) { + switch((BlockFace) data) { // TODO: Verify (Where did these values come from...?) case SOUTH_EAST: datavalue = 0; break; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 79ae6d1b61..f66aa0ed84 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -952,17 +952,17 @@ public class CraftWorld implements World { } int dir; switch (face) { - case EAST: + case SOUTH: default: dir = 0; break; - case NORTH: + case WEST: dir = 1; break; - case WEST: + case NORTH: dir = 2; break; - case SOUTH: + case EAST: dir = 3; break; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 7f7a7fc5e8..a5c0bed8da 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -174,7 +174,7 @@ public class CraftBlock implements Block { } /** - * Notch uses a 0-5 to mean DOWN, UP, EAST, WEST, NORTH, SOUTH + * Notch uses a 0-5 to mean DOWN, UP, NORTH, SOUTH, WEST, EAST * in that order all over. This method is convenience to convert for us. * * @return BlockFace the BlockFace represented by this number @@ -186,13 +186,13 @@ public class CraftBlock implements Block { case 1: return BlockFace.UP; case 2: - return BlockFace.EAST; - case 3: - return BlockFace.WEST; - case 4: return BlockFace.NORTH; - case 5: + case 3: return BlockFace.SOUTH; + case 4: + return BlockFace.WEST; + case 5: + return BlockFace.EAST; default: return BlockFace.SELF; } @@ -204,13 +204,13 @@ public class CraftBlock implements Block { return 0; case UP: return 1; - case EAST: - return 2; - case WEST: - return 3; case NORTH: - return 4; + return 2; case SOUTH: + return 3; + case WEST: + return 4; + case EAST: return 5; default: return 7; // Good as anything here, but technically invalid @@ -312,10 +312,10 @@ public class CraftBlock implements Block { net.minecraft.server.World world = chunk.getHandle().world; if ((face == BlockFace.DOWN || face == BlockFace.SELF) && world.isBlockFacePowered(x, y - 1, z, 0)) power = wire.getPower(world, x, y - 1, z, power); if ((face == BlockFace.UP || face == BlockFace.SELF) && world.isBlockFacePowered(x, y + 1, z, 1)) power = wire.getPower(world, x, y + 1, z, power); - if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.isBlockFacePowered(x, y, z - 1, 2)) power = wire.getPower(world, x, y, z - 1, power); - if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.isBlockFacePowered(x, y, z + 1, 3)) power = wire.getPower(world, x, y, z + 1, power); - if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.isBlockFacePowered(x - 1, y, z, 4)) power = wire.getPower(world, x - 1, y, z, power); - if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.isBlockFacePowered(x + 1, y, z, 5)) power = wire.getPower(world, x + 1, y, z, power); + if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.isBlockFacePowered(x + 1, y, z, 2)) power = wire.getPower(world, x + 1, y, z, power); + if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.isBlockFacePowered(x - 1, y, z, 3)) power = wire.getPower(world, x - 1, y, z, power); + if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.isBlockFacePowered(x, y, z - 1, 4)) power = wire.getPower(world, x, y, z - 1, power); + if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.isBlockFacePowered(x, y, z + 1, 5)) power = wire.getPower(world, x, y, z - 1, power); return power > 0 ? power : (face == BlockFace.SELF ? isBlockIndirectlyPowered() : isBlockFaceIndirectlyPowered(face)) ? 15 : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java index e2279e2029..e51dddbd56 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java @@ -28,17 +28,17 @@ public class CraftHanging extends CraftEntity implements Hanging { hanging.y = block.getY(); hanging.z = block.getZ(); switch (face) { - case EAST: + case SOUTH: default: getHandle().setDirection(0); break; - case NORTH: + case WEST: getHandle().setDirection(1); break; - case WEST: + case NORTH: getHandle().setDirection(2); break; - case SOUTH: + case EAST: getHandle().setDirection(3); break; } @@ -57,13 +57,13 @@ public class CraftHanging extends CraftEntity implements Hanging { switch (this.getHandle().direction) { case 0: default: - return BlockFace.EAST; - case 1: - return BlockFace.NORTH; - case 2: - return BlockFace.WEST; - case 3: return BlockFace.SOUTH; + case 1: + return BlockFace.WEST; + case 2: + return BlockFace.NORTH; + case 3: + return BlockFace.EAST; } }