diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java index 88297493a..f78e9ebc0 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java @@ -18,7 +18,9 @@ import biomesoplenty.common.block.BlockDoubleDecoration; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; +import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; @@ -41,6 +43,12 @@ public class GeneratorDoubleFlora extends GeneratorCustomizable this(amountPerChunk, BOPBlocks.double_plant.getDefaultState().withProperty(BlockBOPDoublePlant.VARIANT, type).withProperty(BlockBOPDoublePlant.HALF, BlockDoubleDecoration.Half.LOWER), BOPBlocks.double_plant.getDefaultState().withProperty(BlockBOPDoublePlant.VARIANT, type).withProperty(BlockBOPDoublePlant.HALF, BlockDoubleDecoration.Half.UPPER), generationAttempts); } + // convenient shortcut constructor for use with a vanilla BlockDoublePlant variant + public GeneratorDoubleFlora(int amountPerChunk, BlockDoublePlant.EnumPlantType type, int generationAttempts) + { + this(amountPerChunk, Blocks.double_plant.getStateFromMeta(type.getMeta()), Blocks.double_plant.getStateFromMeta(8), generationAttempts); + } + public GeneratorDoubleFlora(int amountPerChunk, IBlockState bottomState, IBlockState topState, int generationAttempts) { this.amountPerChunk = amountPerChunk;