use of betterwithaddons.world.WorldGenBigTrees in project BetterWithAddons by DaedalusGame.
the class BlockModSapling method generateTree.
public void generateTree(World worldIn, BlockPos pos, IBlockState state, Random rand) {
if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos))
return;
WorldGenerator worldgenerator = isBig ? new WorldGenBigTrees(true, log, leaves, this) : new WorldGenTrees(true, 3, log, leaves, false);
int i = 0;
int j = 0;
IBlockState iblockstate2 = Blocks.AIR.getDefaultState();
worldIn.setBlockState(pos, iblockstate2, 4);
if (!worldgenerator.generate(worldIn, rand, pos.add(i, 0, j))) {
worldIn.setBlockState(pos, state, 4);
}
}
Aggregations