Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
Fix exceptions being squashed RegionVisitor preloading
Dieser Commit ist enthalten in:
Ursprung
ef62f1e0d9
Commit
effb94623a
@ -108,8 +108,7 @@ public class RegionVisitor implements Operation {
|
|||||||
int lastLeadChunkX = Integer.MIN_VALUE;
|
int lastLeadChunkX = Integer.MIN_VALUE;
|
||||||
int lastLeadChunkZ = Integer.MIN_VALUE;
|
int lastLeadChunkZ = Integer.MIN_VALUE;
|
||||||
int loadingTarget = Settings.IMP.QUEUE.PRELOAD_CHUNK_COUNT;
|
int loadingTarget = Settings.IMP.QUEUE.PRELOAD_CHUNK_COUNT;
|
||||||
try {
|
while (trailIter.hasNext()) {
|
||||||
for (; ; ) {
|
|
||||||
BlockVector3 pt = trailIter.next();
|
BlockVector3 pt = trailIter.next();
|
||||||
apply(pt);
|
apply(pt);
|
||||||
int cx = pt.getBlockX() >> 4;
|
int cx = pt.getBlockX() >> 4;
|
||||||
@ -125,6 +124,8 @@ public class RegionVisitor implements Operation {
|
|||||||
} else {
|
} else {
|
||||||
amount = 1;
|
amount = 1;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
lead:
|
||||||
for (int count = 0; count < amount; ) {
|
for (int count = 0; count < amount; ) {
|
||||||
BlockVector3 v = leadIter.next();
|
BlockVector3 v = leadIter.next();
|
||||||
int vcx = v.getBlockX() >> 4;
|
int vcx = v.getBlockX() >> 4;
|
||||||
@ -136,51 +137,26 @@ public class RegionVisitor implements Operation {
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
// Skip the next 15 blocks
|
// Skip the next 15 blocks
|
||||||
leadIter.next();
|
for (int i = 0; i < 16; i++) {
|
||||||
leadIter.next();
|
if (!leadIter.hasNext()) {
|
||||||
leadIter.next();
|
break lead;
|
||||||
leadIter.next();
|
}
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
|
||||||
leadIter.next();
|
leadIter.next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
|
||||||
}
|
|
||||||
} catch (FaweException e) {
|
} catch (FaweException e) {
|
||||||
|
// Likely to be a low memory or cancellation exception.
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
} catch (Throwable ignore) {
|
} catch (Throwable ignored) {
|
||||||
|
// Ignore as it is likely not something too important, and we can continue with the operation
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < 16; i++) {
|
||||||
|
if (!trailIter.hasNext()) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
for (; ; ) {
|
|
||||||
apply(trailIter.next());
|
|
||||||
apply(trailIter.next());
|
apply(trailIter.next());
|
||||||
}
|
}
|
||||||
} catch (FaweException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
} catch (Throwable ignore) {
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (BlockVector3 pt : region) {
|
for (BlockVector3 pt : region) {
|
||||||
@ -188,7 +164,6 @@ public class RegionVisitor implements Operation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//FAWE end
|
//FAWE end
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren