@Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;

        result = result * PRIME + this.getPosition().hashCode();
        result = result * PRIME + this.getDirection().hashCode();

        return result;
    }
An immutable and serializable vector + direction object
helper/src/main/java/me/lucko/helper/serialize/VectorPoint.java