Fix cursed exception

This commit is contained in:
Brady 2019-01-16 13:50:15 -06:00
parent 59320d9b85
commit db24822d2f
No known key found for this signature in database
GPG Key ID: 73A788379A197567

View File

@ -19,6 +19,7 @@ package baritone.api.utils;
import baritone.api.pathing.calc.IPath;
import java.util.Objects;
import java.util.Optional;
public class PathCalculationResult {
@ -31,11 +32,9 @@ public class PathCalculationResult {
}
public PathCalculationResult(Type type, IPath path) {
Objects.requireNonNull(type);
this.path = path;
this.type = type;
if (type == null) {
throw new IllegalArgumentException("come on");
}
}
public final Optional<IPath> getPath() {