[Fix] Possible crash when generating a tunnel
This commit is contained in:
parent
5dea47dd16
commit
9bfa6688f6
1 changed files with 11 additions and 3 deletions
|
@ -176,11 +176,19 @@ public class TunelCaveFeature extends EndCaveFeature {
|
|||
}
|
||||
|
||||
floorSets.forEach((biome, floorPositions) -> {
|
||||
BlockState surfaceBlock = EndBiome.findTopMaterial(biome.bclBiome);
|
||||
placeFloor(world, generator, (EndCaveBiome) biome.bclBiome, floorPositions, random, surfaceBlock);
|
||||
if (biome != null && biome.bclBiome instanceof EndCaveBiome ecb) {
|
||||
BlockState surfaceBlock = EndBiome.findTopMaterial(biome.bclBiome);
|
||||
placeFloor(world, generator, ecb, floorPositions, random, surfaceBlock);
|
||||
} else {
|
||||
//BCLib.LOGGER.warning("Floor is not a cave biome: " + biome);
|
||||
}
|
||||
});
|
||||
ceilSets.forEach((biome, ceilPositions) -> {
|
||||
placeCeil(world, generator, (EndCaveBiome) biome.bclBiome, ceilPositions, random);
|
||||
if (biome != null && biome.bclBiome instanceof EndCaveBiome ecb) {
|
||||
placeCeil(world, generator, ecb, ceilPositions, random);
|
||||
} else {
|
||||
//BCLib.LOGGER.warning("Ceiling is not a cave biome: " + biome);
|
||||
}
|
||||
});
|
||||
BiomePicker.ActualBiome biome = EndBiomes.getCaveBiome(pos.getX(), pos.getZ());
|
||||
placeWalls(world, generator, (EndCaveBiome) biome.bclBiome, caveBlocks, random);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue