1
0
mirror of https://github.com/cabaletta/baritone synced 2024-12-18 13:15:13 +00:00

bitshift 2: electric boogaloo

This commit is contained in:
Leijurv 2018-12-30 07:36:10 -10:00
parent 258700ee7b
commit 539b0e64c8
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -179,8 +179,8 @@ public final class CachedWorld implements ICachedWorld, Helper {
if (region == null) {
continue;
}
int distX = (region.getX() * 512 + 256) - pruneCenter.getX();
int distZ = (region.getZ() * 512 + 256) - pruneCenter.getZ();
int distX = (region.getX() << 9 + 256) - pruneCenter.getX();
int distZ = (region.getZ() << 9 + 256) - pruneCenter.getZ();
double dist = Math.sqrt(distX * distX + distZ * distZ);
if (dist > 1024) {
logDebug("Deleting cached region " + region.getX() + "," + region.getZ() + " from ram");