mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 18:45:21 +01:00
Optimize chunk filter a little
This commit is contained in:
parent
7f0df85b6f
commit
d97560cc82
@ -282,6 +282,9 @@ public Collection<Vector2i> getChunkList(long modifiedSinceMillis, Predicate<Vec
|
||||
|
||||
for (int x = 0; x < 32; x++) {
|
||||
for (int z = 0; z < 32; z++) {
|
||||
Vector2i chunk = new Vector2i(rX * 32 + x, rZ * 32 + z);
|
||||
if (filter.test(chunk)) {
|
||||
|
||||
int xzChunk = z * 32 + x;
|
||||
|
||||
raf.seek(xzChunk * 4 + 3);
|
||||
@ -296,10 +299,9 @@ public Collection<Vector2i> getChunkList(long modifiedSinceMillis, Predicate<Vec
|
||||
timestamp |= raf.read() & 0xFF;
|
||||
|
||||
if (timestamp >= (modifiedSinceMillis / 1000)) {
|
||||
Vector2i chunk = new Vector2i(rX * 32 + x, rZ * 32 + z);
|
||||
if (filter.test(chunk)) {
|
||||
chunks.add(chunk);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user