From 9e352520b33c922d012a9c3c0517d7e9bf34aee1 Mon Sep 17 00:00:00 2001 From: Cheeserolls Date: Mon, 1 Jun 2015 11:27:33 +0100 Subject: [PATCH] Rebalance flora generation weight values (to compensate for the fact that all flora generation attempts are at the surface) --- .../common/biome/overworld/BiomeGenAlps.java | 4 ++- .../biome/overworld/BiomeGenArctic.java | 5 ++- .../biome/overworld/BiomeGenChaparral.java | 18 +++++----- .../common/biome/overworld/BiomeGenCrag.java | 3 +- .../biome/overworld/BiomeGenDenseForest.java | 16 ++++----- .../biome/overworld/BiomeGenFlowerField.java | 4 +-- .../biome/overworld/BiomeGenHighland.java | 8 ++--- .../overworld/BiomeGenLavenderFields.java | 4 +-- .../biome/overworld/BiomeGenOriginValley.java | 2 +- .../biome/overworld/BiomeGenShrubland.java | 14 ++++---- .../biome/overworld/BiomeGenSteppe.java | 4 +-- .../biome/overworld/BiomeGenThicket.java | 10 +++--- .../biome/overworld/BiomeGenWoodland.java | 34 +++++++++++-------- .../world/feature/GeneratorDoubleFlora.java | 2 +- .../common/world/feature/GeneratorFlora.java | 2 +- .../common/world/feature/GeneratorGrass.java | 16 +++------ .../common/world/feature/GeneratorLogs.java | 6 +++- 17 files changed, 78 insertions(+), 74 deletions(-) diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java index 7cd5607b5..5be322f8a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java @@ -30,6 +30,8 @@ public class BiomeGenAlps extends BOPBiome this.topBlock = Blocks.snow.getDefaultState(); this.fillerBlock = Blocks.snow.getDefaultState(); - this.addGenerator("emeralds", GeneratorStage.SAND, new GeneratorOreSingle(Blocks.emerald_ore.getDefaultState(), 12, 4, 32)); + // gem + this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).state(Blocks.emerald_ore.getDefaultState()).create()); + } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java index c3d9ad968..6269a8063 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java @@ -12,8 +12,6 @@ import net.minecraft.util.BlockPos; import net.minecraftforge.common.BiomeManager.BiomeType; import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.common.block.BlockGem; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.world.feature.GeneratorOreSingle; @@ -32,7 +30,8 @@ public class BiomeGenArctic extends BOPBiome this.spawnableCreatureList.clear(); - this.addGenerator("tanzanite", GeneratorStage.SAND, new GeneratorOreSingle(BOPBlocks.gem_ore.getDefaultState().withProperty(BlockGem.VARIANT, BOPGems.TANZANITE), 12, 4, 32)); + // gem + this.addGenerator("tanzanite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).gemOre(BOPGems.TANZANITE).create()); } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java index 55552dae0..24071ffb1 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java @@ -46,13 +46,13 @@ public class BiomeGenChaparral extends BOPBiome this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(15).from(Blocks.grass).to(Blocks.stone.getDefaultState()).splotchSize(15).create()); // flowers - GeneratorWeighted flowerGenerator = new GeneratorWeighted(5); + GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F); this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator); flowerGenerator.add("rose", 8, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1).flora(BlockDoublePlant.EnumPlantType.ROSE).create()); flowerGenerator.add("syringa", 4, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1).flora(BlockDoublePlant.EnumPlantType.SYRINGA).create()); // grasses - GeneratorWeighted grassGenerator = new GeneratorWeighted(20); + GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).grass(BlockTallGrass.EnumType.GRASS).create()); grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.MEDIUMGRASS).create()); @@ -63,15 +63,15 @@ public class BiomeGenChaparral extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, new GeneratorBush(8, Blocks.log.getDefaultState(), Blocks.leaves.getDefaultState())); // other plants - this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2).flora(BOPPlants.BERRYBUSH).create()); - this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(10).flora(BOPPlants.BUSH).create()); - this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2).flora(BOPPlants.SHRUB).create()); - this.addGenerator("wild_carrots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1).flora(BOPPlants.WILDCARROT).create()); - this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(10).flora(BOPPlants.LEAFPILE).create()); - this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(5).flora(BOPPlants.DEADLEAFPILE).create()); + this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).flora(BOPPlants.BERRYBUSH).create()); + this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).flora(BOPPlants.BUSH).create()); + this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).flora(BOPPlants.SHRUB).create()); + this.addGenerator("wild_carrots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).flora(BOPPlants.WILDCARROT).create()); + this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).flora(BOPPlants.LEAFPILE).create()); + this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).flora(BOPPlants.DEADLEAFPILE).create()); // water plants - this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2).flora(BOPPlants.REED).generationAttempts(128).create()); + this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).flora(BOPPlants.REED).generationAttempts(32).create()); // gem this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).gemOre(BOPGems.PERIDOT).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java index 4a200482f..b7d714e07 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java @@ -35,7 +35,8 @@ public class BiomeGenCrag extends BOPBiome this.waterColorMultiplier = 944693; this.skyColor = 4944498; - this.addGenerator("emeralds", GeneratorStage.SAND, new GeneratorOreSingle(Blocks.emerald_ore.getDefaultState(), 12, 4, 32)); + // gem + this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).state(Blocks.emerald_ore.getDefaultState()).create()); } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDenseForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDenseForest.java index 8d3701a60..ebb9ed24a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDenseForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDenseForest.java @@ -51,16 +51,16 @@ public class BiomeGenDenseForest extends BOPBiome this.alternateTopBlock = Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT); // other plants - this.addGenerator("bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1).flora(BOPPlants.BUSH).create()); - this.addGenerator("berry_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1).flora(BOPPlants.BERRYBUSH).create()); - this.addGenerator("shrubs", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1).flora(BOPPlants.SHRUB).create()); - this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2).flora(BOPPlants.REED).generationAttempts(128).create()); - this.addGenerator("leaf_piles", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(15).flora(BOPPlants.LEAFPILE).generationAttempts(256).create()); - this.addGenerator("huge_trees", GeneratorStage.TREE, (new GeneratorBigTree.Builder()).amountPerChunk(10).minHeight(15).maxHeight(25).create()); - this.addGenerator("leaves_clusters", GeneratorStage.POST, (new GeneratorBush.Builder()).amountPerChunk(7).create()); + this.addGenerator("bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).flora(BOPPlants.BUSH).create()); + this.addGenerator("berry_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).flora(BOPPlants.BERRYBUSH).create()); + this.addGenerator("shrubs", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).flora(BOPPlants.SHRUB).create()); + this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).flora(BOPPlants.REED).generationAttempts(32).create()); + this.addGenerator("leaf_piles", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1.5F).flora(BOPPlants.LEAFPILE).generationAttempts(64).create()); + this.addGenerator("huge_trees", GeneratorStage.TREE, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).minHeight(15).maxHeight(25).create()); + this.addGenerator("leaves_clusters", GeneratorStage.POST, (new GeneratorBush.Builder()).amountPerChunk(0.7F).create()); // grasses - GeneratorWeighted grassGenerator = new GeneratorWeighted(20); + GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).grass(BlockTallGrass.EnumType.GRASS).create()); grassGenerator.add("fern", 1, (new GeneratorGrass.Builder()).grass(BlockTallGrass.EnumType.FERN).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java index 2127498e9..93ca85bfe 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java @@ -34,7 +34,7 @@ public class BiomeGenFlowerField extends BOPBiome this.addWeight(BiomeType.WARM, 3); // flowers - GeneratorWeighted flowerGenerator = new GeneratorWeighted(999); + GeneratorWeighted flowerGenerator = new GeneratorWeighted(99); this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator); flowerGenerator.add("pink_tulip", 2, (new GeneratorFlora.Builder().flora(EnumFlowerType.PINK_TULIP).create())); flowerGenerator.add("white_tulip", 5, (new GeneratorFlora.Builder().flora(EnumFlowerType.WHITE_TULIP).create())); @@ -42,7 +42,7 @@ public class BiomeGenFlowerField extends BOPBiome flowerGenerator.add("red_tulip", 10, (new GeneratorFlora.Builder().flora(EnumFlowerType.RED_TULIP).create())); // grasses - GeneratorWeighted grassGenerator = new GeneratorWeighted(20); + GeneratorWeighted grassGenerator = new GeneratorWeighted(0.2F); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.WHEATGRASS).create()); grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.DAMPGRASS).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java index b45177392..6a6aa477e 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java @@ -37,14 +37,14 @@ public class BiomeGenHighland extends BOPBiome this.addWeight(BiomeType.WARM, 7); // other plants - this.addGenerator("wild_carrots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1).flora(BOPPlants.WILDCARROT).create()); + this.addGenerator("wild_carrots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).flora(BOPPlants.WILDCARROT).create()); // boulders - this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(4).placeOn(Blocks.grass).to(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(1.2F).numBalls(1).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); - this.addGenerator("big_boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(1).placeOn(Blocks.grass).to(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(4.0F).numBalls(3).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.grass).to(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(1.2F).numBalls(1).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("big_boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.1F).placeOn(Blocks.grass).to(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(4.0F).numBalls(3).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); // grasses - GeneratorWeighted grassGenerator = new GeneratorWeighted(100); + GeneratorWeighted grassGenerator = new GeneratorWeighted(10); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.WHEATGRASS).create()); grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.DAMPGRASS).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java index a9867e2ca..8f1d8e0d1 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java @@ -38,7 +38,7 @@ public class BiomeGenLavenderFields extends BOPBiome this.addWeight(BiomeType.WARM, 3); // flowers - this.addGenerator("lavender", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(999).flora(BOPFlowers.LAVENDER).create()); + this.addGenerator("lavender", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(99).flora(BOPFlowers.LAVENDER).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(1); @@ -47,7 +47,7 @@ public class BiomeGenLavenderFields extends BOPBiome treeGenerator.add("oak", 1, (new GeneratorBigTree.Builder()).create()); // grasses - GeneratorWeighted grassGenerator = new GeneratorWeighted(20); + GeneratorWeighted grassGenerator = new GeneratorWeighted(2); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.WHEATGRASS).create()); grassGenerator.add("tallgrass", 3, (new GeneratorGrass.Builder()).grass(BlockTallGrass.EnumType.GRASS).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java index ba3f5c5c0..179d983bd 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java @@ -41,7 +41,7 @@ public class BiomeGenOriginValley extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, (new GeneratorBasicTree.Builder()).amountPerChunk(4).minHeight(5).maxHeight(8).leaves(BOPTrees.ORIGIN).create()); // flowers - GeneratorWeighted flowerGenerator = new GeneratorWeighted(4); + GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.4F); this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator); flowerGenerator.add("rose", 8, (new GeneratorFlora.Builder().flora(BOPFlowers.ROSE).create())); flowerGenerator.add("yellow_flower", 10, (new GeneratorFlora.Builder().flora(EnumFlowerType.DANDELION).create())); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java index fac3f971b..31a801d3d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java @@ -44,21 +44,21 @@ public class BiomeGenShrubland extends BOPBiome this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).to(Blocks.gravel.getDefaultState()).create()); // other plants - this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(7).flora(BOPPlants.BUSH).create()); - this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(5).flora(BOPPlants.SHRUB).create()); - this.addGenerator("flax", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(1).flora(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(24).create()); + this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.7F).flora(BOPPlants.BUSH).create()); + this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).flora(BOPPlants.SHRUB).create()); + this.addGenerator("flax", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(0.1F).flora(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(6).create()); // water plants - this.addGenerator("water_reeds", GeneratorStage.LILYPAD,(new GeneratorFlora.Builder()).amountPerChunk(3).flora(BOPPlants.REED).generationAttempts(128).create()); + this.addGenerator("water_reeds", GeneratorStage.LILYPAD,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).flora(BOPPlants.REED).generationAttempts(32).create()); // trees - this.addGenerator("trees", GeneratorStage.TREE, new GeneratorBush(1, Blocks.log.getDefaultState(), Blocks.leaves.getDefaultState())); + this.addGenerator("trees", GeneratorStage.TREE, (new GeneratorBush.Builder()).amountPerChunk(1).create()); // flowers - this.addGenerator("flowers", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(5).flora(EnumFlowerType.ALLIUM).create()); + this.addGenerator("flowers", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).flora(EnumFlowerType.ALLIUM).create()); // grasses - GeneratorWeighted grassGenerator = new GeneratorWeighted(20); + GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.SHORTGRASS).create()); grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.MEDIUMGRASS).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java index 4878afbee..5e9a5f48d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java @@ -36,10 +36,10 @@ public class BiomeGenSteppe extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); // other plants - this.addGenerator("dead_bushes", GeneratorStage.DEAD_BUSH,(new GeneratorFlora.Builder()).amountPerChunk(3).flora(Blocks.deadbush.getDefaultState()).generationAttempts(4).create()); + this.addGenerator("dead_bushes", GeneratorStage.DEAD_BUSH,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).flora(Blocks.deadbush.getDefaultState()).generationAttempts(4).create()); // grasses - this.addGenerator("shrubs", GeneratorStage.GRASS,(new GeneratorGrass.Builder()).amountPerChunk(15).grass(BlockBOPPlant.paging.getVariantState(BOPPlants.SHORTGRASS)).create()); + this.addGenerator("shrubs", GeneratorStage.GRASS,(new GeneratorGrass.Builder()).amountPerChunk(1.5F).grass(BlockBOPPlant.paging.getVariantState(BOPPlants.SHORTGRASS)).create()); // gem this.addGenerator("ruby", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).gemOre(BOPGems.RUBY).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenThicket.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenThicket.java index ae87e4962..5eb6fa084 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenThicket.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenThicket.java @@ -45,11 +45,11 @@ public class BiomeGenThicket extends BOPBiome this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).to(Blocks.gravel.getDefaultState()).create()); // other plants - this.addGenerator("flowers", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(5).flora(EnumFlowerType.POPPY).create()); - this.addGenerator("thorns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(55).flora(BOPPlants.THORN).create()); - this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(5).flora(BOPPlants.SHRUB).create()); - this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(5).flora(BOPPlants.LEAFPILE).generationAttempts(256).create()); - this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(10).flora(BOPPlants.DEADLEAFPILE).generationAttempts(256).create()); + this.addGenerator("flowers", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).flora(EnumFlowerType.POPPY).create()); + this.addGenerator("thorns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(5.5F).flora(BOPPlants.THORN).create()); + this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).flora(BOPPlants.SHRUB).create()); + this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).flora(BOPPlants.LEAFPILE).generationAttempts(32).create()); + this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).flora(BOPPlants.DEADLEAFPILE).generationAttempts(32).create()); // gem this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).gemOre(BOPGems.AMBER).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java index 5e2e6e89f..9dc6157da 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java @@ -20,6 +20,7 @@ import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; +import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.world.feature.GeneratorBigMushroom; import biomesoplenty.common.world.feature.GeneratorDoubleFlora; import biomesoplenty.common.world.feature.GeneratorFlora; @@ -50,15 +51,15 @@ public class BiomeGenWoodland extends BOPBiome treeGenerator.add("oak", 9, (new GeneratorBasicTree.Builder()).minHeight(5).maxHeight(8).create()); // grasses - GeneratorWeighted grassGenerator = new GeneratorWeighted(14); + GeneratorWeighted grassGenerator = new GeneratorWeighted(1.4F); this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.WHEATGRASS).create()); grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).grass(BOPPlants.DAMPGRASS).create()); grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).grass(BlockTallGrass.EnumType.GRASS).create()); // big mushrooms - GeneratorWeighted mushroomGenerator = new GeneratorWeighted(1); - this.addGenerator("big_mushrooms", GeneratorStage.TREE, mushroomGenerator); + GeneratorWeighted mushroomGenerator = new GeneratorWeighted(0.5F); + this.addGenerator("big_mushrooms", GeneratorStage.BIG_SHROOM, mushroomGenerator); mushroomGenerator.add("brown_mushroom", 1, (new GeneratorBigMushroom.Builder()).mushroomType(GeneratorBigMushroom.BigMushroomType.BROWN).create()); mushroomGenerator.add("red_mushroom", 1, (new GeneratorBigMushroom.Builder()).mushroomType(GeneratorBigMushroom.BigMushroomType.RED).create()); @@ -66,24 +67,29 @@ public class BiomeGenWoodland extends BOPBiome this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).to(Blocks.gravel.getDefaultState()).create()); // flowers - GeneratorWeighted flowerGenerator = new GeneratorWeighted(5); + GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F); this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator); - flowerGenerator.add("rose", 1, (new GeneratorDoubleFlora.Builder()).flora(BlockDoublePlant.EnumPlantType.ROSE).generationAttempts(64).create()); + flowerGenerator.add("rose", 1, (new GeneratorDoubleFlora.Builder()).flora(BlockDoublePlant.EnumPlantType.ROSE).create()); // other plants - this.addGenerator("toadstools", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3).flora(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); - this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(20).flora(BOPPlants.SHRUB).create()); - this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(10).flora(BOPPlants.CLOVERPATCH).create()); - this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(10).flora(BOPPlants.LEAFPILE).generationAttempts(256).create()); - this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(10).flora(BOPPlants.DEADLEAFPILE).generationAttempts(256).create()); - this.addGenerator("flax", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1).flora(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(64).create()); + this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).flora(BOPPlants.SHRUB).create()); + this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).flora(BOPPlants.CLOVERPATCH).create()); + this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).flora(BOPPlants.LEAFPILE).generationAttempts(64).create()); + this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).flora(BOPPlants.DEADLEAFPILE).generationAttempts(64).create()); + this.addGenerator("flax", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.1F).flora(BlockBOPDoublePlant.DoublePlantType.FLAX).create()); // water plants - this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(5).flora(BOPPlants.REED).generationAttempts(128).create()); - this.addGenerator("duckweed", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(5).flora(BlockBOPLilypad.LilypadType.DUCKWEED).generationAttempts(128).create()); + this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.8F).flora(BOPPlants.REED).generationAttempts(32).create()); + this.addGenerator("duckweed", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.8F).flora(BlockBOPLilypad.LilypadType.DUCKWEED).generationAttempts(32).create()); + + // shrooms + this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).flora(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); // logs - this.addGenerator("logs", GeneratorStage.TREE, (new GeneratorLogs.Builder()).amountPerChunk(8).create()); + GeneratorWeighted logsGenerator = new GeneratorWeighted(2.5F); + this.addGenerator("logs", GeneratorStage.TREE, logsGenerator); + logsGenerator.add("oak_logs", 1, (new GeneratorLogs.Builder()).create()); + logsGenerator.add("dead_logs", 1, (new GeneratorLogs.Builder()).log(BOPWoods.DEAD).create()); // gem this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).gemOre(BOPGems.AMBER).create()); diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java index fbea16266..98a7c3bb4 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java @@ -32,7 +32,7 @@ public class GeneratorDoubleFlora extends BOPGeneratorBase protected float amountPerChunk = 1.0F; protected IBlockState bottomState = BOPBlocks.double_plant.getDefaultState().withProperty(BlockBOPDoublePlant.VARIANT, BlockBOPDoublePlant.DoublePlantType.FLAX).withProperty(BlockBOPDoublePlant.HALF, BlockDoubleDecoration.Half.LOWER); protected IBlockState topState = BOPBlocks.double_plant.getDefaultState().withProperty(BlockBOPDoublePlant.VARIANT, BlockBOPDoublePlant.DoublePlantType.FLAX).withProperty(BlockBOPDoublePlant.HALF, BlockDoubleDecoration.Half.UPPER); - protected int generationAttempts = 64; + protected int generationAttempts = 20; public Builder amountPerChunk(float a) {this.amountPerChunk = a; return this;} public Builder flora(IBlockState bottom, IBlockState top) {this.bottomState = bottom; this.topState = top; return this;} diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java index 273c46861..d8b41173f 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java @@ -35,7 +35,7 @@ public class GeneratorFlora extends BOPGeneratorBase { protected float amountPerChunk = 1.0F; protected IBlockState state = Blocks.red_flower.getDefaultState(); - protected int generationAttempts = 64; + protected int generationAttempts = 20; public Builder amountPerChunk(float a) {this.amountPerChunk = a; return this;} public Builder flora(IBlockState a) {this.state = a; return this;} diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java index f90e46bda..cf48c989d 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java @@ -28,7 +28,7 @@ public class GeneratorGrass extends GeneratorFlora { protected float amountPerChunk = 1.0F; protected IBlockState grass = Blocks.tallgrass.getDefaultState(); - protected int generationAttempts = 128; + protected int generationAttempts = 40; public Builder amountPerChunk(float a) {this.amountPerChunk = a; return this;} public Builder grass(IBlockState a) {this.grass = a; return this;} @@ -49,18 +49,10 @@ public class GeneratorGrass extends GeneratorFlora } @Override - public void scatter(World world, Random random, BlockPos pos) + public BlockPos getScatterY(World world, Random random, int x, int z) { - for (int i = 0; i < this.amountPerChunk; i++) - { - int x = random.nextInt(16) + 8; - int z = random.nextInt(16) + 8; - BlockPos genPos = pos.add(x, 0, z); - int y = GeneratorUtils.safeNextInt(random, world.getHeight(genPos).getY() * 2); - genPos = genPos.add(0, y, 0); - - generate(world, random, genPos); - } + // always at world surface + return GeneratorUtils.ScatterYMethod.AT_SURFACE.getBlockPos(world, random, x, z); } @Override diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java index dd5973e5e..67bb2d15d 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java @@ -20,6 +20,8 @@ import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import biomesoplenty.api.biome.generation.BOPGeneratorBase; +import biomesoplenty.common.block.BlockBOPLog; +import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.block.BlockQueryUtils; import biomesoplenty.common.util.block.BlockQueryUtils.BlockQueryAny; import biomesoplenty.common.util.block.BlockQueryUtils.BlockQueryBlock; @@ -41,10 +43,12 @@ public class GeneratorLogs extends BOPGeneratorBase protected int maxLength = 5; public Builder amountPerChunk(float a) {this.amountPerChunk = a; return this;} + public Builder log(IBlockState a) {this.log = a; return this;} + public Builder log(BOPWoods a) {this.log = BlockBOPLog.paging.getVariantState(a); return this;} public Builder placeOn(IBlockQuery a) {this.placeOn = a; return this;} public Builder placeOn(String a) throws BlockQueryParseException {this.placeOn = BlockQueryUtils.parseQueryString(a); return this;} public Builder placeOn(Block a) {this.placeOn = new BlockQueryBlock(a); return this;} - public Builder placeOn(IBlockState a) {this.placeOn = new BlockQueryState(a); return this;} + public Builder placeOn(IBlockState a) {this.placeOn = new BlockQueryState(a); return this;} public Builder minLength(int a) {this.minLength = a; return this;} public Builder maxLength(int a) {this.maxLength = a; return this;}