mirror of https://github.com/cabaletta/baritone
Merge branch '1.19.4' into 1.20.2
This commit is contained in:
commit
3a3b012199
|
@ -196,9 +196,7 @@ public final class CachedWorld implements ICachedWorld, Helper {
|
||||||
int distZ = ((region.getZ() << 9) + 256) - pruneCenter.getZ();
|
int distZ = ((region.getZ() << 9) + 256) - pruneCenter.getZ();
|
||||||
double dist = Math.sqrt(distX * distX + distZ * distZ);
|
double dist = Math.sqrt(distX * distX + distZ * distZ);
|
||||||
if (dist > 1024) {
|
if (dist > 1024) {
|
||||||
if (!Baritone.settings().censorCoordinates.value) {
|
logDebug("Deleting cached region from ram");
|
||||||
logDebug("Deleting cached region " + region.getX() + "," + region.getZ() + " from ram");
|
|
||||||
}
|
|
||||||
cachedRegions.remove(getRegionID(region.getX(), region.getZ()));
|
cachedRegions.remove(getRegionID(region.getX(), region.getZ()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ public enum FasterWorldScanner implements IWorldScanner {
|
||||||
long chunkX = (long) pos.x << 4;
|
long chunkX = (long) pos.x << 4;
|
||||||
long chunkZ = (long) pos.z << 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();
|
return collectChunkSections(lookup, chunkProvider.getChunk(pos.x, pos.z, false), chunkX, chunkZ, playerSectionY).stream();
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class BlockStateInterface {
|
||||||
prevCached = region;
|
prevCached = region;
|
||||||
cached = 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) {
|
if (type == null) {
|
||||||
return AIR;
|
return AIR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue