@ -85,7 +85,8 @@ class DefaultGenerationTask(
do {
lastChunkCoords = nextChunkCoordinates
count = shape.count
} while (PaperLib.isChunkGenerated(world, lastChunkCoords.x, lastChunkCoords.z))
println(count)
} while (PaperLib.isChunkGenerated(world, lastChunkCoords.x, lastChunkCoords.z) && !borderReached())
}
/**
@ -52,7 +52,7 @@ class Circle(center: Pair<Int, Int>, start: Pair<Int, Int>, radius: Int) : Shape
if (count == 0 && currentPos != center) {
val tmpCircle = Circle(center, center, radius)
while (tmpCircle.next() != currentPos);
while (tmpCircle.next() != currentPos && !tmpCircle.endReached());
this.count = tmpCircle.count
this.r = tmpCircle.r
@ -39,7 +39,7 @@ class Spiral(center: Pair<Int, Int>, start: Pair<Int, Int>, radius: Int): Shape(
// simulate the spiral to get the correct direction and count
val simSpiral = Spiral(center, center, radius)
while (simSpiral.next() != currentPos);
while (simSpiral.next() != currentPos && !simSpiral.endReached());
direction = simSpiral.direction
count = simSpiral.count