This commit is contained in:
paulevsGitch 2020-11-26 15:44:28 +03:00
parent b28cb6449c
commit 7947d92b1d
8 changed files with 11 additions and 19 deletions

View file

@ -143,17 +143,19 @@ public class TenaneaFeature extends DefaultFeature {
support.forEach((bpos) -> {
int count = MHelper.randRange(3, 8, random);
mut.set(bpos);
BlocksHelper.setWithoutUpdate(world, mut, top);
for (int i = 1; i < count; i++) {
mut.setY(mut.getY() - 1);
if (world.isAir(mut.down())) {
BlocksHelper.setWithoutUpdate(world, mut, middle);
}
else {
break;
if (world.getBlockState(mut.up()).isOf(EndBlocks.TENANEA_LEAVES)) {
BlocksHelper.setWithoutUpdate(world, mut, top);
for (int i = 1; i < count; i++) {
mut.setY(mut.getY() - 1);
if (world.isAir(mut.down())) {
BlocksHelper.setWithoutUpdate(world, mut, middle);
}
else {
break;
}
}
BlocksHelper.setWithoutUpdate(world, mut, bottom);
}
BlocksHelper.setWithoutUpdate(world, mut, bottom);
});
}