SPIGOT-6843: Wrong PLAINS biome during custom chunk generation

This commit is contained in:
DerFrZocker 2021-12-18 11:33:22 +11:00 committed by md_5
parent e36f7599d6
commit 41832ce7e4
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -186,6 +186,17 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
}
ChunkSection section = sections[sec];
// SPIGOT-6843: Copy biomes over to new section.
// Not the most performant way, but has a small footprint and developer should move to the new api anyway
ChunkSection oldSection = csect[sec];
for (int biomeX = 0; biomeX < 4; biomeX++) {
for (int biomeY = 0; biomeY < 4; biomeY++) {
for (int biomeZ = 0; biomeZ < 4; biomeZ++) {
section.setBiome(biomeX, biomeY, biomeZ, oldSection.getNoiseBiome(biomeX, biomeY, biomeZ));
}
}
}
csect[sec] = section;
}