From 9e045fbfe5376f03b86536623a114916e1ab55db Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Thu, 28 Jan 2016 18:27:56 -0500 Subject: [PATCH] Changed how quicksand generates --- .../common/biome/overworld/BiomeGenBrushland.java | 4 +++- .../common/biome/overworld/BiomeGenTropicalRainforest.java | 4 +++- .../biomesoplenty/common/biome/vanilla/BiomeExtDesert.java | 7 +++++++ .../common/biome/vanilla/BiomeExtSavanna.java | 7 +++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java index cf17f4b89..02229b40f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java @@ -4,6 +4,7 @@ import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import biomesoplenty.api.biome.BOPBiome; @@ -20,6 +21,7 @@ import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.world.BOPWorldSettings; 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; @@ -44,7 +46,7 @@ public class BiomeGenBrushland extends BOPBiome this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); // quicksand - this.addGenerator("quicksand_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(0.6F).splotchSize(16).with(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).splotchSize(20).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(2.4F); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java index 8682f1839..7adacbc7b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java @@ -4,6 +4,7 @@ import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; @@ -28,6 +29,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.GeneratorSplatter; import biomesoplenty.common.world.feature.GeneratorSplotches; @@ -60,7 +62,7 @@ public class BiomeGenTropicalRainforest extends BOPBiome this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); // quicksand - this.addGenerator("quicksand_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(0.6F).splotchSize(16).with(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).splotchSize(20).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(15.0F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java index c8475f707..9afae71e6 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java @@ -1,11 +1,15 @@ package biomesoplenty.common.biome.vanilla; +import net.minecraft.block.state.IBlockState; import net.minecraft.world.biome.BiomeGenBase; import biomesoplenty.api.biome.ExtendedBiomeWrapper; import biomesoplenty.api.biome.generation.GeneratorStage; +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.common.block.BlockBOPSand; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.world.feature.GeneratorFlora; +import biomesoplenty.common.world.feature.GeneratorLakes; import biomesoplenty.common.world.feature.GeneratorOreSingle; public class BiomeExtDesert extends ExtendedBiomeWrapper @@ -14,6 +18,9 @@ public class BiomeExtDesert extends ExtendedBiomeWrapper { super(BiomeGenBase.desert); + // quicksand + this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); + // other plants this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.TINYCACTUS).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java index 24154ce0f..c105a1022 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java @@ -1,14 +1,18 @@ package biomesoplenty.common.biome.vanilla; +import net.minecraft.block.state.IBlockState; import net.minecraft.world.biome.BiomeGenBase; import biomesoplenty.api.biome.ExtendedBiomeWrapper; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.common.block.BlockBOPSand; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.world.feature.GeneratorFlora; import biomesoplenty.common.world.feature.GeneratorGrass; +import biomesoplenty.common.world.feature.GeneratorLakes; import biomesoplenty.common.world.feature.GeneratorOreSingle; public class BiomeExtSavanna extends ExtendedBiomeWrapper @@ -17,6 +21,9 @@ public class BiomeExtSavanna extends ExtendedBiomeWrapper { super(BiomeGenBase.savanna); + // quicksand + this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.1F).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); + // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(4.0F); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);