Fix possible NullPointerExceptions caused by last commit

Silly Brady forgot how Optional works!
This commit is contained in:
Brady 2018-08-05 23:45:50 -05:00
parent 23db615695
commit 091c19ca72
No known key found for this signature in database
GPG Key ID: 73A788379A197567

View File

@ -57,11 +57,11 @@ public class MovementState {
}
public final Optional<Vec3d> getPosition() {
return Optional.of(this.position);
return Optional.ofNullable(this.position);
}
public final Optional<Rotation> getRotation() {
return Optional.of(this.rotation);
return Optional.ofNullable(this.rotation);
}
}