[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:
@@ -30,16 +30,16 @@ public class PistonExtensionMaterial extends MaterialData implements Attachable
|
||||
case UP:
|
||||
data |= 1;
|
||||
break;
|
||||
case EAST:
|
||||
case NORTH:
|
||||
data |= 2;
|
||||
break;
|
||||
case WEST:
|
||||
case SOUTH:
|
||||
data |= 3;
|
||||
break;
|
||||
case NORTH:
|
||||
case WEST:
|
||||
data |= 4;
|
||||
break;
|
||||
case SOUTH:
|
||||
case EAST:
|
||||
data |= 5;
|
||||
break;
|
||||
}
|
||||
@@ -55,13 +55,13 @@ public class PistonExtensionMaterial extends MaterialData implements Attachable
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user