Fix cursed exception
This commit is contained in:
@@ -19,6 +19,7 @@ package baritone.api.utils;
|
|||||||
|
|
||||||
import baritone.api.pathing.calc.IPath;
|
import baritone.api.pathing.calc.IPath;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
public class PathCalculationResult {
|
public class PathCalculationResult {
|
||||||
@@ -31,11 +32,9 @@ public class PathCalculationResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PathCalculationResult(Type type, IPath path) {
|
public PathCalculationResult(Type type, IPath path) {
|
||||||
|
Objects.requireNonNull(type);
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
if (type == null) {
|
|
||||||
throw new IllegalArgumentException("come on");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Optional<IPath> getPath() {
|
public final Optional<IPath> getPath() {
|
||||||
|
|||||||
Reference in New Issue
Block a user