[BREAKING] Update BlockFace directions. Fixes BUKKIT-1567, BUKKIT-3069
If you use BlockFace in any way, to compensate the directionals being incorrect, you can still have backwards compatibility if you add in the handling in your plugin: boolean legacyBlockFace = BlockFace.NORTH().getModX() == -1; (and then handle it accordingly) If you didn't special case your directions to fix what's being fixed here... Hurray! Your plugin should now work. By: feildmaster <admin@feildmaster.com>
This commit is contained in:
@@ -179,7 +179,7 @@ public class BlockIterator implements Iterator<Block> {
|
||||
}
|
||||
|
||||
private BlockFace getXFace(Vector direction) {
|
||||
return ((direction.getX() > 0) ? BlockFace.SOUTH : BlockFace.NORTH);
|
||||
return ((direction.getX() > 0) ? BlockFace.EAST : BlockFace.WEST);
|
||||
}
|
||||
|
||||
private BlockFace getYFace(Vector direction) {
|
||||
@@ -187,7 +187,7 @@ public class BlockIterator implements Iterator<Block> {
|
||||
}
|
||||
|
||||
private BlockFace getZFace(Vector direction) {
|
||||
return ((direction.getZ() > 0) ? BlockFace.WEST : BlockFace.EAST);
|
||||
return ((direction.getZ() > 0) ? BlockFace.SOUTH : BlockFace.NORTH);
|
||||
}
|
||||
|
||||
private double getXLength(Vector direction) {
|
||||
|
||||
Reference in New Issue
Block a user