From 46ca1b6fac8f13fd5d29b2f5a507e26e68e141b8 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Tue, 19 Jan 2016 17:21:58 -0500 Subject: [PATCH] Fixed plants from growing on mud blocks, tweaked Marsh biome --- .../common/biome/overworld/BiomeGenMarsh.java | 17 ++++++++++------- .../biomesoplenty/common/block/BlockBOPMud.java | 16 +--------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java index 2aa93bc44..ed3045d40 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java @@ -28,6 +28,7 @@ import biomesoplenty.common.world.BOPWorldSettings; import biomesoplenty.common.world.feature.GeneratorDoubleFlora; import biomesoplenty.common.world.feature.GeneratorFlora; import biomesoplenty.common.world.feature.GeneratorGrass; +import biomesoplenty.common.world.feature.GeneratorLakes; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.GeneratorSplotches; import biomesoplenty.common.world.feature.GeneratorWaterside; @@ -41,10 +42,10 @@ public class BiomeGenMarsh extends BOPBiome public BiomeGenMarsh() { // terrain - this.terrainSettings.avgHeight(63).heightVariation(5, 5).octaves(5, 5, 0, 0, 1, 1).sidewaysNoise(0.1D); + this.terrainSettings.avgHeight(63).heightVariation(5, 2).octaves(5, 5, 0, 0, 1, 1).sidewaysNoise(0.1D); - this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SILTY); - this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY); + this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY); + this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY); this.seaFloorBlock = BOPBlocks.mud.getDefaultState(); this.setColor(0x66A06E); this.setTemperatureRainfall(0.5F, 0.9F); @@ -60,7 +61,9 @@ public class BiomeGenMarsh extends BOPBiome // mud this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(8).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create()); - this.addGenerator("mud_patches", GeneratorStage.SAND_PASS2, (new GeneratorSplotches.Builder()).amountPerChunk(1).splotchSize(12).replace(this.topBlock).with(BOPBlocks.mud.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + + // lakes + this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(3.0F).waterLakeForBiome(this).create()); // other plants this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).create()); @@ -73,9 +76,9 @@ public class BiomeGenMarsh extends BOPBiome // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(20.0F); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); - grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create()); - grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create()); - grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create()); + grassGenerator.add("wheatgrass", 3, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create()); + grassGenerator.add("dampgrass", 3, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create()); + grassGenerator.add("tallgrass", 3, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create()); grassGenerator.add("doublegrass", 10, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create()); // gem diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java index 96adeffa9..67fd3afd1 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java @@ -153,21 +153,7 @@ public class BlockBOPMud extends Block implements IBOPBlock, ISustainsPlantType @Override public boolean canSustainPlantType(IBlockAccess world, BlockPos pos, EnumPlantType plantType) { - switch (plantType) - { - case Plains: - return true; - case Beach: - return ( - world.getBlockState(pos.east()).getBlock().getMaterial() == Material.water || - world.getBlockState(pos.west()).getBlock().getMaterial() == Material.water || - world.getBlockState(pos.north()).getBlock().getMaterial() == Material.water || - world.getBlockState(pos.south()).getBlock().getMaterial() == Material.water - ); - // don't support anything else by default - default: - return false; - } + return false; }