Return the valid max value for piston direction. Fixes BUKKIT-2191
By returning the following value (7) we remove the need to special case pistons in any way (other than the original purpose of this check, which is to ensure pistons have valid data)
This commit is contained in:
@@ -217,7 +217,7 @@ public class BlockPiston extends Block {
|
||||
}
|
||||
|
||||
public static int e(int i) {
|
||||
if ((i & 7) >= Facing.OPPOSITE_FACING.length) return 0; // CraftBukkit - check for AIOOB on piston data
|
||||
if ((i & 7) >= Facing.OPPOSITE_FACING.length) return 7; // CraftBukkit - check for AIOOB on piston data
|
||||
return i & 7;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user