|
|
@ -34,26 +34,17 @@ class GenerationTaskSpigot(
|
|
|
|
if (borderReachedCheck()) return
|
|
|
|
if (borderReachedCheck()) return
|
|
|
|
|
|
|
|
|
|
|
|
var chunk = nextChunkCoordinates
|
|
|
|
var chunk = nextChunkCoordinates
|
|
|
|
for (i in 0 until chunkSkips) {
|
|
|
|
for (i in 0 until chunksPerStep) {
|
|
|
|
if (world.isChunkGenerated(chunk.x, chunk.z)) {
|
|
|
|
if (borderReached()) break
|
|
|
|
chunk = nextChunkCoordinates
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!world.isChunkGenerated(chunk.x, chunk.z)) {
|
|
|
|
|
|
|
|
for (i in 0 until chunksPerStep) {
|
|
|
|
|
|
|
|
if (borderReached()) break
|
|
|
|
|
|
|
|
val chunkInstance = world.getChunkAt(chunk.x, chunk.z)
|
|
|
|
|
|
|
|
chunkInstance.load(true)
|
|
|
|
|
|
|
|
loadedChunks.add(chunkInstance)
|
|
|
|
|
|
|
|
chunk = nextChunkCoordinates
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
val chunkInstance = world.getChunkAt(chunk.x, chunk.z)
|
|
|
|
val chunkInstance = world.getChunkAt(chunk.x, chunk.z)
|
|
|
|
chunkInstance.load(true)
|
|
|
|
chunkInstance.load(true)
|
|
|
|
loadedChunks.add(chunkInstance)
|
|
|
|
loadedChunks.add(chunkInstance)
|
|
|
|
|
|
|
|
chunk = nextChunkCoordinates
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val chunkInstance = world.getChunkAt(chunk.x, chunk.z)
|
|
|
|
|
|
|
|
chunkInstance.load(true)
|
|
|
|
|
|
|
|
loadedChunks.add(chunkInstance)
|
|
|
|
|
|
|
|
|
|
|
|
lastChunkCoords = chunk
|
|
|
|
lastChunkCoords = chunk
|
|
|
|
count = shape.count
|
|
|
|
count = shape.count
|
|
|
|
}
|
|
|
|
}
|
|
|
|