use of net.glowstone.generator.objects.trees.JungleBush in project Glowstone by GlowstoneMC.
the class JunglePopulator method populateOnGround.
@Override
public void populateOnGround(World world, Random random, Chunk chunk) {
int sourceX = chunk.getX() << 4;
int sourceZ = chunk.getZ() << 4;
for (int i = 0; i < 7; i++) {
int x = sourceX + random.nextInt(16);
int z = sourceZ + random.nextInt(16);
int y = world.getHighestBlockYAt(x, z);
Block sourceBlock = world.getBlockAt(x, y, z);
BlockStateDelegate delegate = new BlockStateDelegate();
JungleBush bush = new JungleBush(random, sourceBlock.getLocation(), delegate);
if (bush.generate()) {
delegate.updateBlockStates();
}
}
super.populateOnGround(world, random, chunk);
melonDecorator.populate(world, random, chunk);
}
Aggregations