@Test public void testAxis() throws Exception { Assert.assertEquals(Axis.Z, BlockFaceUtils.getAxis(BlockFace.SOUTH)); Assert.assertEquals(Axis.Z, BlockFaceUtils.getAxis(BlockFace.NORTH)); Assert.assertEquals(Axis.X, BlockFaceUtils.getAxis(BlockFace.WEST)); Assert.assertEquals(Axis.X, BlockFaceUtils.getAxis(BlockFace.EAST)); Assert.assertEquals(Axis.Y, BlockFaceUtils.getAxis(BlockFace.UP)); Assert.assertEquals(Axis.Y, BlockFaceUtils.getAxis(BlockFace.DOWN)); }
public static Axis getAxis(@Nonnull BlockFace blockFace) { Preconditions.checkNotNull(blockFace, "block face cannot be null."); Preconditions.checkArgument(ArrayUtils.contains(adjacents, blockFace), "block face has multiple axis."); return blockFace.getModY() != 0 ? Axis.Y : blockFace.getModX() != 0 ? Axis.X : Axis.Z; }
BlockFaceUtils { public static Axis getAxis(@Nonnull BlockFace blockFace) { Preconditions.checkNotNull(blockFace, "block face cannot be null."); Preconditions.checkArgument(ArrayUtils.contains(adjacents, blockFace), "block face has multiple axis."); return blockFace.getModY() != 0 ? Axis.Y : blockFace.getModX() != 0 ? Axis.X : Axis.Z; } }
BlockFaceUtils { public static Axis getAxis(@Nonnull BlockFace blockFace) { Preconditions.checkNotNull(blockFace, "block face cannot be null."); Preconditions.checkArgument(ArrayUtils.contains(adjacents, blockFace), "block face has multiple axis."); return blockFace.getModY() != 0 ? Axis.Y : blockFace.getModX() != 0 ? Axis.X : Axis.Z; } private  BlockFaceUtils(); }
BlockFaceUtils { public static Axis getAxis(@Nonnull BlockFace blockFace) { Preconditions.checkNotNull(blockFace, "block face cannot be null."); Preconditions.checkArgument(ArrayUtils.contains(adjacents, blockFace), "block face has multiple axis."); return blockFace.getModY() != 0 ? Axis.Y : blockFace.getModX() != 0 ? Axis.X : Axis.Z; } private  BlockFaceUtils(); static boolean isVertical(BlockFace face); static boolean isHorizontal(BlockFace face); static BlockFace getLeft(BlockFace face); static BlockFace getRight(BlockFace face); static BlockFace[] getAdjacents(); static Axis getAxis(@Nonnull BlockFace blockFace); static float getYaw(@Nonnull BlockFace blockFace); }
BlockFaceUtils { public static Axis getAxis(@Nonnull BlockFace blockFace) { Preconditions.checkNotNull(blockFace, "block face cannot be null."); Preconditions.checkArgument(ArrayUtils.contains(adjacents, blockFace), "block face has multiple axis."); return blockFace.getModY() != 0 ? Axis.Y : blockFace.getModX() != 0 ? Axis.X : Axis.Z; } private  BlockFaceUtils(); static boolean isVertical(BlockFace face); static boolean isHorizontal(BlockFace face); static BlockFace getLeft(BlockFace face); static BlockFace getRight(BlockFace face); static BlockFace[] getAdjacents(); static Axis getAxis(@Nonnull BlockFace blockFace); static float getYaw(@Nonnull BlockFace blockFace);  }