mirror of https://github.com/cabaletta/baritone
Fix other null checks
This commit is contained in:
parent
a90e720956
commit
b366b1b1d1
|
@ -143,12 +143,10 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
||||||
return this.path0(ctx.playerFeet(), this.path.get(upToIncl), segment -> segment.append(after.stream(), complete))
|
return this.path0(ctx.playerFeet(), this.path.get(upToIncl), segment -> segment.append(after.stream(), complete))
|
||||||
.whenComplete((result, ex) -> {
|
.whenComplete((result, ex) -> {
|
||||||
this.recalculating = false;
|
this.recalculating = false;
|
||||||
if (ex != null) {
|
if (ex instanceof PathCalculationException) {
|
||||||
if (ex instanceof PathCalculationException) {
|
logDirect("Failed to recompute segment");
|
||||||
logDirect("Failed to recompute segment");
|
} else if (ex != null) {
|
||||||
} else {
|
logUnhandledException(ex);
|
||||||
logUnhandledException(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -175,12 +173,10 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
||||||
})
|
})
|
||||||
.whenComplete((result, ex) -> {
|
.whenComplete((result, ex) -> {
|
||||||
this.recalculating = false;
|
this.recalculating = false;
|
||||||
if (ex != null) {
|
if (ex instanceof PathCalculationException) {
|
||||||
if (ex instanceof PathCalculationException) {
|
logDirect("Failed to compute next segment");
|
||||||
logDirect("Failed to compute next segment");
|
} else if (ex != null) {
|
||||||
} else {
|
logUnhandledException(ex);
|
||||||
logUnhandledException(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue