diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java index 36eee5fb8..66b422d1d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java @@ -53,10 +53,8 @@ public class BiomeGenMarsh extends BOPBiome this.spawnableWaterCreatureList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3)); - // lakes (it might seem obvious that lakes should be done at GeneratorStage.WATER_LAKES, but that is actually executed very late, after all plants and flowers // TODO: find a way to make the lakes shallower // TODO: put splotches of mud on the bottom? Either using a new GeneratorSplotches or perhaps by adding a lake parameter - // this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.5F).waterLakeForBiome(this).create()); // mud this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(8).maxRadius(7).with(BOPBlocks.mud.getDefaultState().withProperty(BlockMud.VARIANT, BlockMud.MudType.MUD)).create()); @@ -79,8 +77,8 @@ public class BiomeGenMarsh extends BOPBiome // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); + - } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java index b9d5ed3fd..4a94baa4b 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java @@ -24,6 +24,7 @@ import biomesoplenty.common.util.block.BlockQueryUtils.BlockQueryState; import biomesoplenty.common.util.block.BlockQueryUtils.IBlockPosQuery; import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; +import net.minecraft.block.BlockBush; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -101,7 +102,16 @@ public class GeneratorDoubleFlora extends BOPGeneratorBase if (this.replace.matches(world, genPos) && this.replace.matches(world, genPos.up()) && genPos.getY() < 254) { - boolean canStay = bottomBlock instanceof BlockDecoration ? ((BlockDecoration)bottomBlock).canBlockStay(world, genPos, this.bottomState) : bottomBlock.canPlaceBlockAt(world, genPos); + boolean canStay; + if (bottomBlock instanceof BlockDecoration) + { + canStay = ((BlockDecoration)bottomBlock).canBlockStay(world, genPos, this.bottomState); + } else if (bottomBlock instanceof BlockBush) { + canStay = ((BlockBush)bottomBlock).canPlaceBlockAt(world, genPos); + } else { + canStay = bottomBlock.canPlaceBlockAt(world, genPos); + } + if (canStay) { world.setBlockState(genPos, this.bottomState, 2); diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java index 837b1acf5..da9f04a51 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java @@ -11,6 +11,7 @@ package biomesoplenty.common.world.feature; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.BlockBush; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -97,7 +98,16 @@ public class GeneratorFlora extends BOPGeneratorBase if (this.replace.matches(world, genPos) && genPos.getY() < 255) { - boolean canStay = block instanceof BlockDecoration ? ((BlockDecoration)block).canBlockStay(world, genPos, this.with) : block.canPlaceBlockAt(world, genPos); + boolean canStay; + if (block instanceof BlockDecoration) + { + canStay = ((BlockDecoration)block).canBlockStay(world, genPos, this.with); + } else if (block instanceof BlockBush) { + canStay = ((BlockBush)block).canPlaceBlockAt(world, genPos); + } else { + canStay = block.canPlaceBlockAt(world, genPos); + } + if (canStay) { world.setBlockState(genPos, this.with, 2);