Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
Hehe...missed the magical %16
Browse files Browse the repository at this point in the history
  • Loading branch information
robotia committed Apr 10, 2016
1 parent 0f997fc commit 9e0f738
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/java/thermos/wrapper/ChunkBlockHashMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ public boolean bulkCheck(Collection<int[]> 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
{
Expand All @@ -79,24 +82,32 @@ public boolean bulkCheck(Collection<int[]> 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];
}
}

Expand Down

0 comments on commit 9e0f738

Please sign in to comment.