mirror of
https://github.com/cabaletta/baritone
synced 2025-02-02 21:01:35 +00:00
Merge pull request #4172 from ZacSharp/1.20.2-update
Merge 1.19.4 into 1.20.2
This commit is contained in:
commit
a945cfaa3c
@ -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()));
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user