Small fixes
This commit is contained in:
parent
15abc9f07f
commit
5a62974f12
3 changed files with 32 additions and 35 deletions
|
@ -55,7 +55,7 @@ public class TenaneaBushFeature extends DefaultFeature {
|
|||
if (info.getState().getBlock() instanceof LeavesBlock) {
|
||||
int distance = info.getPos().getManhattanDistance(pos);
|
||||
if (distance < 7) {
|
||||
if (random.nextBoolean() && info.getStateDown().isAir()) {
|
||||
if (random.nextInt(4) == 0 && info.getStateDown().isAir()) {
|
||||
BlockPos d = info.getPos().down();
|
||||
support.add(d);
|
||||
}
|
||||
|
@ -90,9 +90,11 @@ public class TenaneaBushFeature extends DefaultFeature {
|
|||
BlockState middle = EndBlocks.TENANEA_FLOWERS.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE);
|
||||
BlockState bottom = EndBlocks.TENANEA_FLOWERS.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM);
|
||||
support.forEach((bpos) -> {
|
||||
BlockState state = world.getBlockState(bpos);
|
||||
if (state.isAir() || state.isOf(EndBlocks.TENANEA_OUTER_LEAVES)) {
|
||||
int count = MHelper.randRange(3, 8, random);
|
||||
mut.set(bpos);
|
||||
if (world.isAir(mut) && world.getBlockState(mut.up()).isOf(EndBlocks.TENANEA_LEAVES)) {
|
||||
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);
|
||||
|
@ -105,6 +107,7 @@ public class TenaneaBushFeature extends DefaultFeature {
|
|||
}
|
||||
BlocksHelper.setWithoutUpdate(world, mut, bottom);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
|
@ -159,15 +159,6 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
});
|
||||
sphere.fillRecursiveIgnore(world, pos, IGNORE);
|
||||
/*Collection<PosInfo> list = sphere.fillRecursiveIgnore(world, pos, IGNORE);
|
||||
list.forEach((info) -> {
|
||||
if (info.getState().getBlock() instanceof LeavesBlock && info.getState().get(LeavesBlock.DISTANCE) == 6) {
|
||||
BlockState state = BlocksHelper.getLeavesState(info.getState(), world, info.getPos());
|
||||
if (!state.equals(info.getState())) {
|
||||
BlocksHelper.setWithoutUpdate(world, info.getPos(), state);
|
||||
}
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
if (radius > 5) {
|
||||
|
|
|
@ -90,7 +90,7 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
|
||||
List<BlockPos> support = Lists.newArrayList();
|
||||
sphere.setPostProcess((info) -> {
|
||||
if (random.nextBoolean() && info.getStateDown().isAir()) {
|
||||
if (random.nextInt(6) == 0 && info.getStateDown().isAir()) {
|
||||
BlockPos d = info.getPos().down();
|
||||
support.add(d);
|
||||
}
|
||||
|
@ -141,9 +141,11 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.TENANEA.bark);
|
||||
|
||||
support.forEach((bpos) -> {
|
||||
BlockState state = world.getBlockState(bpos);
|
||||
if (state.isAir() || state.isOf(EndBlocks.TENANEA_OUTER_LEAVES)) {
|
||||
int count = MHelper.randRange(3, 8, random);
|
||||
mut.set(bpos);
|
||||
if (world.isAir(mut) && world.getBlockState(mut.up()).isOf(EndBlocks.TENANEA_LEAVES)) {
|
||||
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);
|
||||
|
@ -156,6 +158,7 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
}
|
||||
BlocksHelper.setWithoutUpdate(world, mut, bottom);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue