[Fix] Crash when erroding

This commit is contained in:
Frank 2022-07-02 19:38:45 +02:00
parent e35fe997c1
commit 600bb6f9ac

View file

@ -261,6 +261,7 @@ public class StructureErode {
for (int z = bounds.minZ(); z <= bounds.maxZ(); z++) {
mut.setZ(z);
BlockState top = BiomeAPI.findTopMaterial(world.getBiome(mut)).orElse(defaultBlock);
if (top == null) continue;
for (int y = bounds.maxY(); y >= bounds.minY(); y--) {
mut.setY(y);
BlockState state = world.getBlockState(mut);