forked from RepoMirrors/baritone
Fix possible NullPointerExceptions caused by last commit
Silly Brady forgot how Optional works!
This commit is contained in:
parent
23db615695
commit
091c19ca72
|
@ -57,11 +57,11 @@ public class MovementState {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Optional<Vec3d> getPosition() {
|
public final Optional<Vec3d> getPosition() {
|
||||||
return Optional.of(this.position);
|
return Optional.ofNullable(this.position);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Optional<Rotation> getRotation() {
|
public final Optional<Rotation> getRotation() {
|
||||||
return Optional.of(this.rotation);
|
return Optional.ofNullable(this.rotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue