From 2266314959ae1273790308920ceb81750f0f4efe Mon Sep 17 00:00:00 2001 From: Forstride Date: Wed, 6 Apr 2016 21:32:48 -0400 Subject: [PATCH] Fixed underground decoration placement --- src/main/java/biomesoplenty/api/biome/BOPBiome.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiome.java b/src/main/java/biomesoplenty/api/biome/BOPBiome.java index c2cf2a782..cef80a7f5 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiome.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiome.java @@ -28,6 +28,8 @@ import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.init.ModBiomes; import biomesoplenty.common.util.biome.BiomeUtils; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; +import biomesoplenty.common.util.block.BlockQuery; +import biomesoplenty.common.util.block.BlockQuery.IBlockPosQuery; import biomesoplenty.common.util.config.BOPConfig; import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import biomesoplenty.common.world.BOPWorldSettings; @@ -88,9 +90,11 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome // roots this.addGenerator("roots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BOPPlants.ROOT).create()); - this.addGenerator("miners_delight", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPFlowers.MINERS_DELIGHT).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); - this.addGenerator("glowshrooms", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BOPBlocks.mushroom.getDefaultState().withProperty(BlockBOPMushroom.VARIANT, BlockBOPMushroom.MushroomType.GLOWSHROOM)).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); - this.addGenerator("stone_formations", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(30.0F).generationAttempts(32).placeOn(Blocks.stone).with(BOPBlocks.stone_formations.getDefaultState()).scatterYMethod(ScatterYMethod.BELOW_GROUND).minHeight(1).maxHeight(7).randomDirection(true).create()); + + IBlockPosQuery suitableStonePosition = BlockQuery.buildAnd().withAltitudeBetween(0, 55).blocks(Blocks.stone).create(); + this.addGenerator("miners_delight", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.25F).generationAttempts(64).with(BOPFlowers.MINERS_DELIGHT).placeOn(suitableStonePosition).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); + this.addGenerator("glowshrooms", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).generationAttempts(64).placeOn(suitableStonePosition).with(BOPBlocks.mushroom.getDefaultState().withProperty(BlockBOPMushroom.VARIANT, BlockBOPMushroom.MushroomType.GLOWSHROOM)).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); + this.addGenerator("stone_formations", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(30.0F).generationAttempts(32).placeOn(suitableStonePosition).with(BOPBlocks.stone_formations.getDefaultState()).minHeight(1).maxHeight(7).randomDirection(true).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); } public BOPBiome(String idName, PropsBuilder defaultBuilder)