feat: feature generation but only in even chunks

This commit is contained in:
Christian Bergschneider
2024-12-28 21:41:51 +01:00
parent f953c5085d
commit fa6e0e0ae4
2 changed files with 6 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ public class GeneratedChunkCache {
return chunk;
}
public CachedChunk at(int x, int y) {
return cache.get(Pair.of(x, y));
public CachedChunk at(int x, int z) {
return cache.get(Pair.of(x, z));
}
}

View File

@@ -34,6 +34,10 @@ public class MinestomChunkGeneratorWrapper implements Generator {
//chunk.writeRelative(unit.modifier());
if (start.chunkX() % 2 == 0 && start.chunkZ() % 2 == 0) {
chunk.writeRelative(unit.modifier());
}
unit.fork(setter -> {
MinestomProtoWorld protoWorld = new MinestomProtoWorld(
cache,