public static VectorPoint deserialize(JsonElement element) {
        Vector3d position = VectorSerializers.deserialize3d(element);
        Direction direction = Direction.deserialize(element);

        return of(position, direction);
    }
An immutable and serializable vector + direction object
helper/src/main/java/me/lucko/helper/serialize/VectorPoint.java