Merge remote-tracking branch 'upstream/master' into asyncFill

This commit is contained in:
Guntram Blohm 2019-03-20 09:54:48 +01:00
commit e6564300c7
1 changed files with 9 additions and 2 deletions

View File

@ -49,8 +49,8 @@ public class WorldFillTask implements Runnable
private transient int length = -1;
private transient int current = 0;
private transient boolean insideBorder = true;
private List<CoordXZ> storedChunks = new LinkedList<CoordXZ>();
private Set<CoordXZ> originalChunks = new HashSet<CoordXZ>();
private List<CoordXZ> storedChunks = new LinkedList<>();
private Set<CoordXZ> originalChunks = new HashSet<>();
private transient CoordXZ lastChunk = new CoordXZ(0, 0);
// for reporting progress back to user occasionally
@ -235,11 +235,18 @@ public class WorldFillTask implements Runnable
if (!forceLoad)
{
// skip past any chunks which are confirmed as fully generated using our super-special isChunkFullyGenerated routine
int rLoop = 0;
while (worldData.isChunkFullyGenerated(x, z))
{
rLoop++;
insideBorder = true;
if (!moveToNext())
return;
if (rLoop > 255)
{ // only skim through max 256 chunks (~8 region files) at a time here, to allow process to take a break if needed
readyToGo = true;
return;
}
}
}