mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
more chunk fixes
This commit is contained in:
parent
41e136b880
commit
c0b940d619
@ -196,20 +196,18 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
|
||||
public boolean a() {
|
||||
if (!this.g.C) {
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
if (!this.a.isEmpty()) {
|
||||
// CraftBukkit start
|
||||
long chunkcoordinates = this.a.popFirst();
|
||||
Chunk chunk = e.get(chunkcoordinates);
|
||||
if (chunk == null) continue;
|
||||
// CraftBukkit end
|
||||
chunk.e();
|
||||
this.b(chunk);
|
||||
this.a(chunk);
|
||||
this.a.remove(chunkcoordinates);
|
||||
this.e.remove(chunkcoordinates);
|
||||
this.f.remove(chunk);
|
||||
}
|
||||
while (!this.a.isEmpty()) {
|
||||
// CraftBukkit start
|
||||
long chunkcoordinates = this.a.popFirst();
|
||||
Chunk chunk = e.get(chunkcoordinates);
|
||||
if (chunk == null) continue;
|
||||
// CraftBukkit end
|
||||
chunk.e();
|
||||
this.b(chunk);
|
||||
this.a(chunk);
|
||||
this.a.remove(chunkcoordinates);
|
||||
this.e.remove(chunkcoordinates);
|
||||
this.f.remove(chunk);
|
||||
}
|
||||
|
||||
if (this.d != null) {
|
||||
|
@ -32,7 +32,7 @@ public class LongHashset<V> extends LongHash<V> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
outer[0] = inner = Arrays.copyOf(inner, i+1);
|
||||
outer[outerIdx] = inner = Arrays.copyOf(inner, i+1);
|
||||
inner[i] = key;
|
||||
count++;
|
||||
}
|
||||
@ -82,12 +82,14 @@ public class LongHashset<V> extends LongHash<V> {
|
||||
count--;
|
||||
long ret = inner[inner.length - 1];
|
||||
outer[i] = Arrays.copyOf(inner, inner.length - 1);
|
||||
System.err.println("Removing chunk (" + msw(ret) + ", " + lsw(ret) + ")");
|
||||
return ret;
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public long[] keys() {
|
||||
int index = 0;
|
||||
long ret[] = new long[count];
|
||||
|
Loading…
Reference in New Issue
Block a user