From 9e0f7382fee8f197c5bfa238f1aac00f3f03ae73 Mon Sep 17 00:00:00 2001 From: Robotia Date: Sun, 10 Apr 2016 00:01:02 -0400 Subject: [PATCH] Hehe...missed the magical %16 --- .../java/thermos/wrapper/ChunkBlockHashMap.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/java/thermos/wrapper/ChunkBlockHashMap.java b/src/main/java/thermos/wrapper/ChunkBlockHashMap.java index b03772f5..656edf7a 100644 --- a/src/main/java/thermos/wrapper/ChunkBlockHashMap.java +++ b/src/main/java/thermos/wrapper/ChunkBlockHashMap.java @@ -66,10 +66,13 @@ public boolean bulkCheck(Collection coords) if (set[0] >> 4 == x >> 4 && set[1] >> 4 == z >> 4) { x = set[0]; z = set[1]; + x %= 16; + z %= 16; if (last[(x + (x >> 31)) ^ (x >> 31)][(z + (z >> 31)) ^ (z >> 31)] == null) { return false; - } + } + x = set[0]; z = set[1]; } else { @@ -79,24 +82,32 @@ public boolean bulkCheck(Collection coords) { return false; } + x %= 16; + z %= 16; if (last[(x + (x >> 31)) ^ (x >> 31)][(z + (z >> 31)) ^ (z >> 31)] == null) { return false; - } + } + x = set[0]; z = set[1]; + } } else { x = set[0]; z = set[1]; last = this.map.get((((long)(x>>4))<<32L)^(z>>4)); + if (last == null) { return false; } + x %= 16; + z %= 16; if (last[(x + (x >> 31)) ^ (x >> 31)][(z + (z >> 31)) ^ (z >> 31)] == null) { return false; } + x = set[0]; z = set[1]; } }