Skip to content

Commit a945cfa

Browse files
authored
Merge pull request #4172 from ZacSharp/1.20.2-update
Merge 1.19.4 into 1.20.2
2 parents 9bf890a + 3a3b012 commit a945cfa

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/main/java/baritone/cache/CachedWorld.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ private synchronized void prune() {
196196
int distZ = ((region.getZ() << 9) + 256) - pruneCenter.getZ();
197197
double dist = Math.sqrt(distX * distX + distZ * distZ);
198198
if (dist > 1024) {
199-
if (!Baritone.settings().censorCoordinates.value) {
200-
logDebug("Deleting cached region " + region.getX() + "," + region.getZ() + " from ram");
201-
}
199+
logDebug("Deleting cached region from ram");
202200
cachedRegions.remove(getRegionID(region.getX(), region.getZ()));
203201
}
204202
}

src/main/java/baritone/cache/FasterWorldScanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private Stream<BlockPos> scanChunkInternal(IPlayerContext ctx, BlockOptionalMeta
147147
long chunkX = (long) pos.x << 4;
148148
long chunkZ = (long) pos.z << 4;
149149

150-
int playerSectionY = ctx.playerFeet().y >> 4;
150+
int playerSectionY = (ctx.playerFeet().y - ctx.world().getMinBuildHeight()) >> 4;
151151

152152
return collectChunkSections(lookup, chunkProvider.getChunk(pos.x, pos.z, false), chunkX, chunkZ, playerSectionY).stream();
153153
}

src/main/java/baritone/utils/BlockStateInterface.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public BlockState get0(int x, int y, int z) { // Mickey resigned
132132
prevCached = region;
133133
cached = region;
134134
}
135-
BlockState type = cached.getBlock(x & 511, y, z & 511);
135+
BlockState type = cached.getBlock(x & 511, y + world.dimensionType().minY(), z & 511);
136136
if (type == null) {
137137
return AIR;
138138
}

0 commit comments

Comments
 (0)