Tweaked the Redwood Forest biome

This commit is contained in:
Forstride 2017-06-13 01:17:24 -04:00
parent bfb1c17ae8
commit 570954e7c6
1 changed files with 12 additions and 53 deletions

View File

@ -13,6 +13,7 @@ import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
@ -23,6 +24,7 @@ import biomesoplenty.common.world.generator.tree.GeneratorBush;
import biomesoplenty.common.world.generator.tree.GeneratorRedwoodTree;
import biomesoplenty.common.world.generator.tree.GeneratorRedwoodTreeThin;
import net.minecraft.block.BlockDirt;
import net.minecraft.block.BlockDoublePlant;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockFlower.EnumFlowerType;
import net.minecraft.block.BlockPlanks;
@ -34,9 +36,6 @@ import net.minecraft.world.chunk.ChunkPrimer;
public class BiomeGenRedwoodForest extends BOPOverworldBiome
{
public IBlockState usualTopBlock;
public IBlockState alternateTopBlock;
public BiomeGenRedwoodForest()
{
@ -45,51 +44,31 @@ public class BiomeGenRedwoodForest extends BOPOverworldBiome
// terrain
this.terrainSettings.avgHeight(70).heightVariation(1, 1);
this.topBlock = Blocks.GRASS.getDefaultState();
this.usualTopBlock = this.topBlock;
this.alternateTopBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL);
this.topBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL);
this.canGenerateVillages = false;
this.addWeight(BOPClimates.WARM_TEMPERATE, 7);
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
// trees
GeneratorWeighted treeGenerator = new GeneratorWeighted(17.0F);
GeneratorWeighted treeGenerator = new GeneratorWeighted(10.0F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("redwood", 3, (new GeneratorRedwoodTree.Builder()).log(BOPWoods.REDWOOD).leaves(BOPTrees.REDWOOD).create());
treeGenerator.add("redwood_thin", 1, (new GeneratorRedwoodTreeThin.Builder()).log(BOPWoods.REDWOOD).leaves(BOPTrees.REDWOOD).create());
treeGenerator.add("oak_bush", 2, (new GeneratorBush.Builder()).maxHeight(2).create());
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
this.addGenerator("flowers", GeneratorStage.FLOWERS, flowerGenerator);
flowerGenerator.add("blue_orchid", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.BLUE_ORCHID).create()));
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
// other plants
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.7F).with(BOPPlants.BUSH).create());
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.SHRUB).create());
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).placeOn(BlockQueries.fertile).with(BOPPlants.DEADLEAFPILE).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).generationAttempts(64).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).generationAttempts(64).create());
this.addGenerator("double_fern", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(8.0F).with(BlockDoublePlant.EnumPlantType.FERN).create());
// shrooms
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create());
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create());
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F);
GeneratorWeighted grassGenerator = new GeneratorWeighted(8.0F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).generationAttempts(128).create());
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).generationAttempts(128).create());
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).generationAttempts(128).create());
grassGenerator.add("fern", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
// gem
@ -97,15 +76,6 @@ public class BiomeGenRedwoodForest extends BOPOverworldBiome
}
@Override
public void configure(IConfigObj conf)
{
super.configure(conf);
this.usualTopBlock = this.topBlock;
this.alternateTopBlock = conf.getBlockState("alternateTopBlock", this.alternateTopBlock);
}
@Override
public void applySettings(IBOPWorldSettings settings)
{
@ -126,25 +96,14 @@ public class BiomeGenRedwoodForest extends BOPOverworldBiome
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F);
GeneratorWeighted treeGenerator = new GeneratorWeighted(10.0F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("redwood", 1, (new GeneratorRedwoodTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
treeGenerator.add("redwood_thin", 2, (new GeneratorRedwoodTreeThin.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create());
treeGenerator.add("redwood", 3, (new GeneratorRedwoodTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
treeGenerator.add("redwood_thin", 1, (new GeneratorRedwoodTreeThin.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
}
GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers");
if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
{
this.topBlock = (noise + rand.nextDouble() * 3.0D > 1.8D) ? this.alternateTopBlock : this.usualTopBlock;
super.genTerrainBlocks(world, rand, primer, x, z, noise);
}
}