Fix generated only chunk flag not working correctly

This commit is contained in:
Phoenix616 2020-06-01 16:52:23 +01:00
parent 24c0864ff8
commit abf484a161
1 changed files with 5 additions and 0 deletions

View File

@ -375,6 +375,11 @@ public class RandomSearcher {
randomLoc.setZ(((center.getBlockZ() >> 4) + randChunkZ) * 16);
PaperLib.getChunkAtAsync(randomLoc, generatedOnly).thenApply(c -> {
checks++;
if (c == null) {
// Chunk not generated, test another one
checkRandom(future);
return false;
}
int indexOffset = random.nextInt(RANDOM_LIST.size());
Location foundLoc = null;
for (int i = 0; i < RANDOM_LIST.size(); i++) {