From 81932069d98eebb6e0cf81efe9aeb279594c1c40 Mon Sep 17 00:00:00 2001 From: leijurv Date: Wed, 13 Sep 2023 21:25:59 -0700 Subject: [PATCH 1/3] remove footgun --- src/main/java/baritone/cache/CachedWorld.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/baritone/cache/CachedWorld.java b/src/main/java/baritone/cache/CachedWorld.java index e456382e6..aed1faeb5 100644 --- a/src/main/java/baritone/cache/CachedWorld.java +++ b/src/main/java/baritone/cache/CachedWorld.java @@ -196,9 +196,7 @@ private synchronized void prune() { int distZ = ((region.getZ() << 9) + 256) - pruneCenter.getZ(); double dist = Math.sqrt(distX * distX + distZ * distZ); if (dist > 1024) { - if (!Baritone.settings().censorCoordinates.value) { - logDebug("Deleting cached region " + region.getX() + "," + region.getZ() + " from ram"); - } + logDebug("Deleting cached region from ram"); cachedRegions.remove(getRegionID(region.getX(), region.getZ())); } } From 91588caf7dfbded6cd5f80e2e5a12524be54dd0b Mon Sep 17 00:00:00 2001 From: leijurv Date: Thu, 28 Sep 2023 20:42:08 -0700 Subject: [PATCH 2/3] oh my GOD --- src/main/java/baritone/utils/BlockStateInterface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/utils/BlockStateInterface.java b/src/main/java/baritone/utils/BlockStateInterface.java index 2931b9392..095694db9 100644 --- a/src/main/java/baritone/utils/BlockStateInterface.java +++ b/src/main/java/baritone/utils/BlockStateInterface.java @@ -132,7 +132,7 @@ public BlockState get0(int x, int y, int z) { // Mickey resigned prevCached = region; cached = region; } - BlockState type = cached.getBlock(x & 511, y, z & 511); + BlockState type = cached.getBlock(x & 511, y + world.dimensionType().minY(), z & 511); if (type == null) { return AIR; } From 74457db125737aa4ae0b84eaf9ad3c45c8864be8 Mon Sep 17 00:00:00 2001 From: Wagyourtail Date: Wed, 4 Oct 2023 19:24:09 -0600 Subject: [PATCH 3/3] actually fix mine under 0 height --- src/main/java/baritone/cache/FasterWorldScanner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/cache/FasterWorldScanner.java b/src/main/java/baritone/cache/FasterWorldScanner.java index e1c8589e7..65e56975a 100644 --- a/src/main/java/baritone/cache/FasterWorldScanner.java +++ b/src/main/java/baritone/cache/FasterWorldScanner.java @@ -151,7 +151,7 @@ private Stream scanChunkInternal(IPlayerContext ctx, BlockOptionalMeta long chunkX = (long) pos.x << 4; long chunkZ = (long) pos.z << 4; - int playerSectionY = ctx.playerFeet().y >> 4; + int playerSectionY = (ctx.playerFeet().y - ctx.world().getMinBuildHeight()) >> 4; return collectChunkSections(lookup, chunkProvider.getChunk(pos.x, pos.z, false), chunkX, chunkZ, playerSectionY).stream(); }