SPIGOT-6843: Wrong PLAINS biome during custom chunk generation

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2021-12-18 11:33:22 +11:00
parent 94c2fa1b14
commit 96c615d4b8

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;
}