Merge branch '1.19.4' into 1.20.2

This commit is contained in:
ZacSharp 2023-10-29 02:08:57 +01:00
commit 3a3b012199
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
3 changed files with 3 additions and 5 deletions

View File

@ -196,9 +196,7 @@ public final class CachedWorld implements ICachedWorld, Helper {
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()));
}
}

View File

@ -147,7 +147,7 @@ public enum FasterWorldScanner implements IWorldScanner {
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();
}

View File

@ -132,7 +132,7 @@ public class BlockStateInterface {
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;
}