/** * Gets the offset direction from two blocks * @param pos Base position * @param neighbor Position Neighbor position * @return Direction of the offset, or null if no direction */ public static EnumFacing facingFromNeighbor(BlockPos pos, BlockPos neighbor) { // neighbor is first. For example, neighbor height is 11, pos is 10, so result is 1 or up return facingFromOffset(neighbor.subtract(pos)); }