Fixed plants from growing on mud blocks, tweaked Marsh biome

This commit is contained in:
Matt Caughey 2016-01-19 17:21:58 -05:00
parent 9a4f4724ac
commit 46ca1b6fac
2 changed files with 11 additions and 22 deletions

View file

@ -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

View file

@ -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;
}