From 539b0e64c868fe5dad08c89f2b3ae47a9e4cda9a Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 30 Dec 2018 07:36:10 -1000 Subject: [PATCH] bitshift 2: electric boogaloo --- src/main/java/baritone/cache/CachedWorld.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/cache/CachedWorld.java b/src/main/java/baritone/cache/CachedWorld.java index fc1e177b0..b604ce485 100644 --- a/src/main/java/baritone/cache/CachedWorld.java +++ b/src/main/java/baritone/cache/CachedWorld.java @@ -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");