This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (inti = 0; i < this.updateCount && iter.hasNext(); i++) {
this.updates[i] = iter.next();
}
coordinates.clear();
returntrue;
@@ -109,15 +131,17 @@ public boolean load(TInt21TripleHashSet coordinates) {
/*
* Routines to perform lighting updates
*/
publicvoidresolve() {
publicbooleanresolve() {
this.lastResolveTime = System.nanoTime();
longkey;
intx = 0, y = 0, z = 0, i;
intx = 0, y = 0, z = 0, i, j;
intnewChanges = 0;
try {
//Lesser
for (i = 0; i < MAX_PER_TICK && this.load(greater); i++) {
iter= this.updates.iterator();
while (iter.hasNext()) {
key = iter.next();
newChanges += this.updateCount;
for (j = 0; j < this.updateCount; j++) {
key = this.updates[j];
x = Int21TripleHashed.key1(key);
y = Int21TripleHashed.key2(key);
z = Int21TripleHashed.key3(key);
@@ -126,9 +150,9 @@ public void resolve() {
}
//Greater
for (i = 0; i < MAX_PER_TICK && this.load(lesser); i++) {
iter= this.updates.iterator();
while (iter.hasNext()) {
key = iter.next();
newChanges += this.updateCount;
for (j = 0; j < this.updateCount; j++) {
key = this.updates[j];
x = Int21TripleHashed.key1(key);
y = Int21TripleHashed.key2(key);
z = Int21TripleHashed.key3(key);
@@ -142,20 +166,24 @@ public void resolve() {
}
//Refresh
for (i = 0; i < MAX_PER_TICK && this.load(refresh); i++) {
iter= this.updates.iterator();
while (iter.hasNext()) {
key = iter.next();
newChanges += this.updateCount;
for (j = 0; j < this.updateCount; j++) {
key = this.updates[j];
x = Int21TripleHashed.key1(key);
y = Int21TripleHashed.key2(key);
z = Int21TripleHashed.key3(key);
this.resolveRefresh(x, y, z);
this.changes++;
}
}
} catch (Throwablet) {
Stringtype = sky ? "sky" : "block";
System.out.println("An exception occurred while resolving " + type + " lighting at block [" + x + "/" + y + "/" + z + "/" + this.instance.getWorld() + "]:");