Added roots and waterside sand generation to biomes

This commit is contained in:
Matt Caughey 2016-01-23 18:57:46 -05:00
parent fda6e74f63
commit 36e0dbbc2e
23 changed files with 77 additions and 11 deletions

View file

@ -19,10 +19,14 @@ import java.util.Random;
import biomesoplenty.api.biome.generation.GenerationManager;
import biomesoplenty.api.biome.generation.GeneratorStage;
import biomesoplenty.api.biome.generation.IGenerator;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.enums.BOPClimates;
import biomesoplenty.common.enums.BOPPlants;
import biomesoplenty.common.util.config.BOPConfig.IConfigObj;
import biomesoplenty.common.world.BOPWorldSettings;
import biomesoplenty.common.world.TerrainSettings;
import biomesoplenty.common.world.feature.GeneratorDoubleFlora;
import biomesoplenty.common.world.feature.GeneratorFlora;
import net.minecraft.block.BlockSand;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
@ -64,8 +68,10 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome
this.theBiomeDecorator.grassPerChunk = -999;
this.theBiomeDecorator.sandPerChunk = -999;
this.theBiomeDecorator.sandPerChunk2 = -999;
this.theBiomeDecorator.clayPerChunk = -999;
this.theBiomeDecorator.generateLakes = false;
this.theBiomeDecorator.generateLakes = false;
// roots
this.addGenerator("roots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BOPPlants.ROOT).create());
}
public void applySettings(BOPWorldSettings settings)

View file

@ -7,7 +7,9 @@ import biomesoplenty.api.biome.generation.GenerationManager;
import biomesoplenty.api.biome.generation.GeneratorStage;
import biomesoplenty.api.biome.generation.IGenerator;
import biomesoplenty.common.enums.BOPClimates;
import biomesoplenty.common.enums.BOPPlants;
import biomesoplenty.common.util.config.BOPConfig.IConfigObj;
import biomesoplenty.common.world.feature.GeneratorFlora;
import net.minecraft.world.biome.BiomeGenBase;
public class ExtendedBiomeWrapper implements IExtendedBiome
@ -19,6 +21,9 @@ public class ExtendedBiomeWrapper implements IExtendedBiome
public ExtendedBiomeWrapper(BiomeGenBase biome)
{
this.biome = biome;
// roots
this.addGenerator("roots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BOPPlants.ROOT).create());
}
@Override

View file

@ -42,7 +42,8 @@ public class BiomeGenBorealForest extends BOPBiome
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
// gravel
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// trees & logs

View file

@ -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.init.Blocks;
import net.minecraft.util.BlockPos;
import biomesoplenty.api.biome.BOPBiome;
import biomesoplenty.api.biome.generation.GeneratorStage;
@ -21,6 +22,7 @@ import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorSplotches;
import biomesoplenty.common.world.feature.GeneratorWaterside;
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree;
@ -38,6 +40,9 @@ public class BiomeGenBrushland extends BOPBiome
this.setTemperatureRainfall(1.2F, 0.1F);
this.addWeight(BOPClimates.SAVANNA, 10);
//sand
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());

View file

@ -27,6 +27,7 @@ import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorSplotches;
import biomesoplenty.common.world.feature.GeneratorWaterside;
import biomesoplenty.common.world.feature.tree.GeneratorBush;
public class BiomeGenChaparral extends BOPBiome
@ -44,6 +45,9 @@ public class BiomeGenChaparral extends BOPBiome
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// stone patches
this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(15).replace(this.topBlock).with(Blocks.stone.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create());

View file

@ -3,6 +3,7 @@ package biomesoplenty.common.biome.overworld;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import biomesoplenty.api.biome.BOPBiome;
import biomesoplenty.api.biome.generation.GeneratorStage;
@ -18,6 +19,7 @@ import biomesoplenty.common.world.feature.GeneratorDoubleFlora;
import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorWaterside;
import biomesoplenty.common.world.feature.tree.GeneratorBulbTree;
import biomesoplenty.common.world.feature.tree.GeneratorBush;
@ -33,6 +35,9 @@ public class BiomeGenDeciduousForest extends BOPBiome
this.addWeight(BOPClimates.COOL_TEMPERATE, 7);
this.canGenerateVillages = false;
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(18);

View file

@ -50,7 +50,8 @@ public class BiomeGenGrassland extends BOPBiome {
// lakes
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).create());
// gravel
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// other plants

View file

@ -55,7 +55,8 @@ public class BiomeGenHeathland extends BOPBiome
// TODO: why is there SO many horses?
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
// gravel
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// flowers

View file

@ -62,6 +62,9 @@ public class BiomeGenLushDesert extends BOPBiome
treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(0.5F).placeOn(emptyHardenedClay).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).create());
treeGenerator.add("oak_bush", 5, (new GeneratorBush.Builder()).maxHeight(2).placeOn(emptyHardenedClay).create());
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// oases
this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(10).maxRadius(7).replace(Blocks.hardened_clay.getDefaultState()).with(Blocks.grass.getDefaultState()).create());

View file

@ -70,6 +70,9 @@ public class BiomeGenLushSwamp extends BOPBiome
// mud
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(5).maxRadius(8).with(BOPBlocks.mud.getDefaultState()).create());
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// lakes
this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.1F).waterLakeForBiome(this).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).create());

View file

@ -42,7 +42,8 @@ public class BiomeGenMapleWoods extends BOPBiome
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
// gravel
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// trees & logs

View file

@ -42,6 +42,9 @@ public class BiomeGenMeadow extends BOPBiome
this.addWeight(BOPClimates.COOL_TEMPERATE, 10);
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(2);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);

View file

@ -17,11 +17,13 @@ import biomesoplenty.common.world.feature.GeneratorDoubleFlora;
import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorWaterside;
import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree;
import net.minecraft.block.BlockPlanks.EnumType;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
public class BiomeGenPrairie extends BOPBiome
@ -42,6 +44,9 @@ public class BiomeGenPrairie extends BOPBiome
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// trees
this.addGenerator("trees", GeneratorStage.TREE, (new GeneratorTaigaTree.Builder()).amountPerChunk(1).minHeight(6).maxHeight(8).log(EnumType.OAK).leaves(EnumType.OAK).create()); // TODO: implement pine cones

View file

@ -46,6 +46,9 @@ public class BiomeGenRainforest extends BOPBiome
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
// aand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(20);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);

View file

@ -24,6 +24,7 @@ import biomesoplenty.common.world.feature.GeneratorDoubleFlora;
import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorWaterside;
import biomesoplenty.common.world.feature.tree.GeneratorBush;
import biomesoplenty.common.world.feature.tree.GeneratorRedwoodTree;
@ -43,6 +44,9 @@ public class BiomeGenRedwoodForest extends BOPBiome
this.addWeight(BOPClimates.WARM_TEMPERATE, 7);
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// trees
GeneratorWeighted treeGenerator = new GeneratorWeighted(25.0F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);

View file

@ -21,6 +21,7 @@ import biomesoplenty.common.world.feature.GeneratorDoubleFlora;
import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorWaterside;
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
import biomesoplenty.common.world.feature.tree.GeneratorBigTree;
@ -39,6 +40,8 @@ public class BiomeGenSeasonalForest extends BOPBiome
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(20);

View file

@ -46,7 +46,8 @@ public class BiomeGenShrubland extends BOPBiome
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
// gravel
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// other plants

View file

@ -24,6 +24,7 @@ import biomesoplenty.common.world.BOPWorldSettings;
import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorWaterside;
public class BiomeGenSteppe extends BOPBiome
{
@ -43,6 +44,9 @@ public class BiomeGenSteppe extends BOPBiome
// should the Steppe not have some splattered gravel and coarse dirt?
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// other plants
this.addGenerator("dead_bushes", GeneratorStage.DEAD_BUSH,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.deadbush.getDefaultState()).generationAttempts(4).create());

View file

@ -52,7 +52,8 @@ public class BiomeGenTemperateRainforest extends BOPBiome
this.addWeight(BOPClimates.WET_TEMPERATE, 10);
// gravel
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// trees

View file

@ -51,7 +51,8 @@ public class BiomeGenThicket extends BOPBiome
treeGenerator.add("oak", 1, (new GeneratorBasicTree.Builder()).create());
treeGenerator.add("oak_bush", 4, (new GeneratorBush.Builder()).maxHeight(2).create());
// gravel
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// other plants

View file

@ -30,6 +30,7 @@ import biomesoplenty.common.world.feature.GeneratorFlora;
import biomesoplenty.common.world.feature.GeneratorGrass;
import biomesoplenty.common.world.feature.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorSplotches;
import biomesoplenty.common.world.feature.GeneratorWaterside;
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
public class BiomeGenTropicalRainforest extends BOPBiome
@ -53,6 +54,9 @@ public class BiomeGenTropicalRainforest extends BOPBiome
this.spawnableCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
// sand
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());

View file

@ -45,8 +45,7 @@ public class BiomeGenTundra extends BOPBiome
// boulders
this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.grass).with(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(1.2F).numBalls(1).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
// sand & gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// gravel
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(12).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());
// lakes

View file

@ -50,6 +50,9 @@ public class BiomeGenWoodland extends BOPBiome
this.addWeight(BOPClimates.DRY_TEMPERATE, 5);
this.addWeight(BOPClimates.COOL_TEMPERATE, 10);
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create());
// trees
GeneratorWeighted treeGenerator = new GeneratorWeighted(9);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);