Restricted the amount of big trees that can be in a single chunk
This commit is contained in:
parent
73790cfe0f
commit
ab23f5b1ef
2 changed files with 5 additions and 2 deletions
|
@ -58,7 +58,7 @@ public class BiomeGenDenseForest extends BOPBiome
|
|||
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS, new GeneratorFlora(15, BlockBOPPlant.getVariantState(AllPlants.LEAFPILE), 256));
|
||||
|
||||
this.addGenerator("huge_trees", GeneratorStage.TREE, new GeneratorBigTree(7, false, 15, 25, Blocks.log.getDefaultState(), Blocks.leaves.getDefaultState()));
|
||||
this.addGenerator("huge_trees", GeneratorStage.TREE, new GeneratorBigTree(10, false, 15, 25, Blocks.log.getDefaultState(), Blocks.leaves.getDefaultState()));
|
||||
this.addGenerator("leaves_clusters", GeneratorStage.POST, new GeneratorBush(7, Blocks.log.getDefaultState(), Blocks.leaves.getDefaultState()));
|
||||
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(10);
|
||||
|
|
|
@ -436,13 +436,16 @@ public class GeneratorBigTree extends GeneratorCustomizable
|
|||
@Override
|
||||
public void scatter(World world, Random random, BlockPos pos)
|
||||
{
|
||||
int successes = 0;
|
||||
|
||||
for (int i = 0; i < amountPerChunk; i++)
|
||||
{
|
||||
int x = random.nextInt(16) + 8;
|
||||
int z = random.nextInt(16) + 8;
|
||||
BlockPos genPos = world.getHeight(pos.add(x, 0, z));
|
||||
|
||||
generate(world, random, genPos);
|
||||
if (successes < 2 && generate(world, random, genPos))
|
||||
successes++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue