Skip to content

Commit 20c1631

Browse files
committed
oops
1 parent 0912069 commit 20c1631

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/baritone/process/elytra/ElytraBehavior.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ public void tick() {
164164
this.ticksNearUnchanged = 0;
165165
}
166166

167-
if (ctx.player().position().y < context.maxHeight && ctx.player().position().y > 0) {
167+
int minY = ctx.world().dimensionType().minY();
168+
int y = ctx.playerFeet().y;
169+
if (y >= minY && y < minY + context.maxHeight) {
168170
// Obstacles are more important than an incomplete path, handle those first.
169171
this.pathfindAroundObstacles();
170172
this.attemptNextSegment();

src/main/java/baritone/process/elytra/NetherPathfinderContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public void queueBlockUpdate(BlockChangeEvent event) {
155155
public CompletableFuture<UnpackedSegment> pathFindAsync(final BlockPos src, final BlockPos dst) {
156156
final BlockPos adjustedSrc = src.below(minY);
157157
final BlockPos adjustedDst = dst.below(minY);
158-
boolean generate = Baritone.settings().elytraPredictTerrain.value && this.dimension == Level.NETHER;
158+
boolean generate = Baritone.settings().elytraPredictTerrain.value && this.dimension == Level.NETHER;
159159
Lock l = generate ? writeLock : readLock;
160160
ExecutorService exec = generate ? writeExecutor : readExecutor;
161161
return CompletableFuture.supplyAsync(() -> {

0 commit comments

Comments
 (0)