From eea8248490bc6909351a17ee55d4cc8d6adbd2ee Mon Sep 17 00:00:00 2001 From: Forstride Date: Wed, 17 Feb 2016 20:43:39 -0500 Subject: [PATCH] Added world gen setting for using BOP logs/leaves (Doesn't apply to bamboo or cherry trees) --- .../client/gui/GuiBOPConfigureWorld.java | 25 +++++++++++-------- .../biome/overworld/BiomeGenBambooForest.java | 2 ++ .../common/biome/overworld/BiomeGenBayou.java | 14 ++++++++++- .../biome/overworld/BiomeGenBorealForest.java | 12 +++++++++ .../biome/overworld/BiomeGenBrushland.java | 12 +++++++++ .../overworld/BiomeGenConiferousForest.java | 10 ++++++++ .../biome/overworld/BiomeGenDeadForest.java | 11 ++++++++ .../biome/overworld/BiomeGenDeadSwamp.java | 11 ++++++++ .../overworld/BiomeGenEucalyptusForest.java | 11 +++++++- .../common/biome/overworld/BiomeGenFen.java | 14 +++++++++-- .../biome/overworld/BiomeGenFlowerIsland.java | 12 +++++++++ .../common/biome/overworld/BiomeGenGrove.java | 11 ++++++++ .../biome/overworld/BiomeGenHeathland.java | 15 +++++++++++ .../overworld/BiomeGenLavenderFields.java | 11 ++++++++ .../biome/overworld/BiomeGenLushDesert.java | 11 ++++++++ .../biome/overworld/BiomeGenMapleWoods.java | 9 +++++++ .../biome/overworld/BiomeGenMountain.java | 12 +++++++++ .../biome/overworld/BiomeGenMysticGrove.java | 12 +++++++++ .../common/biome/overworld/BiomeGenOasis.java | 4 ++- .../biome/overworld/BiomeGenOminousWoods.java | 12 +++++++++ .../biome/overworld/BiomeGenOrchard.java | 9 +++++++ .../overworld/BiomeGenOvergrownCliffs.java | 11 +++++++- .../biome/overworld/BiomeGenRainforest.java | 10 ++++++++ .../overworld/BiomeGenRedwoodForest.java | 11 +++++++- .../overworld/BiomeGenSacredSprings.java | 7 ++++++ .../overworld/BiomeGenSeasonalForest.java | 14 +++++++++++ .../biome/overworld/BiomeGenShield.java | 10 ++++++++ .../BiomeGenSnowyConiferousForest.java | 10 ++++++++ .../biome/overworld/BiomeGenSnowyForest.java | 11 ++++++++ .../BiomeGenTemperateRainforest.java | 11 ++++++++ .../overworld/BiomeGenTropicalRainforest.java | 10 ++++++++ .../biome/overworld/BiomeGenWasteland.java | 11 ++++++++ .../biome/overworld/BiomeGenWetland.java | 9 +++++++ .../biome/overworld/BiomeGenWoodland.java | 6 ----- .../biome/vanilla/BiomeExtExtremeHills.java | 4 +++ .../vanilla/BiomeExtExtremeHillsPlus.java | 2 ++ .../common/biome/vanilla/BiomeExtForest.java | 2 ++ .../biome/vanilla/BiomeExtForestHills.java | 2 ++ .../biome/vanilla/BiomeExtSwampland.java | 6 +++-- .../common/world/BOPWorldSettings.java | 4 +++ 40 files changed, 366 insertions(+), 25 deletions(-) diff --git a/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java b/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java index 27bb0e93f..992749adc 100644 --- a/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java +++ b/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java @@ -175,16 +175,17 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH LAND_SCHEME (106), RAIN_SCHEME (107), GENERATE_BOP_SOILS (108), - GENERATE_BOP_GRASSES (109), - GENERATE_BOP_FOLIAGE (110), - GENERATE_BOP_FLOWERS (111), - GENERATE_BOP_PLANTS (112), - GENERATE_BOP_WATER_PLANTS (113), - GENERATE_BOP_MUSHROOMS (114), - GENERATE_ROCK_FORMATIONS (115), - GENERATE_POISON_IVY (116), - GENERATE_FLAX (117), - GENERATE_BERRY_BUSHES (118), + GENERATE_BOP_TREES (109), + GENERATE_BOP_GRASSES (110), + GENERATE_BOP_FOLIAGE (111), + GENERATE_BOP_FLOWERS (112), + GENERATE_BOP_PLANTS (113), + GENERATE_BOP_WATER_PLANTS (114), + GENERATE_BOP_MUSHROOMS (115), + GENERATE_ROCK_FORMATIONS (116), + GENERATE_POISON_IVY (117), + GENERATE_FLAX (118), + GENERATE_BERRY_BUSHES (119), GENERATE_THORNS (120), GENERATE_QUICKSAND (121), GENERATE_LIQUID_POISON (122), @@ -240,6 +241,7 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH GuiBOPPageList.GuiFieldEntry[] page2Fields = new GuiBOPPageList.GuiFieldEntry[] { new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_GEMS.getId(), "BOP Gems", true, this.settings.generateBopGems), new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_SOILS.getId(), "BOP Soils", true, this.settings.generateBopSoils), + new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_TREES.getId(), "BOP Logs/Leaves", true, this.settings.generateBopTrees), new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_GRASSES.getId(), "BOP Grasses", true, this.settings.generateBopGrasses), new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_FOLIAGE.getId(), "BOP Foliage", true, this.settings.generateBopFoliage), new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_FLOWERS.getId(), "BOP Flowers", true, this.settings.generateBopFlowers), @@ -354,6 +356,9 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH case GENERATE_BOP_SOILS: this.settings.generateBopSoils = value; break; + case GENERATE_BOP_TREES: + this.settings.generateBopTrees = value; + break; case GENERATE_BOP_GRASSES: this.settings.generateBopGrasses = value; break; diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java index 20a8bfffe..9d99654f4 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java @@ -13,6 +13,7 @@ import java.util.Random; import net.minecraft.block.BlockDirt; 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; @@ -42,6 +43,7 @@ import biomesoplenty.common.world.feature.GeneratorGrass; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; public class BiomeGenBambooForest extends BOPBiome diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java index 2cc8b981b..ccab7e91d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java @@ -9,6 +9,7 @@ package biomesoplenty.common.biome.overworld; import net.minecraft.block.BlockDoublePlant; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.monster.EntitySlime; import net.minecraft.init.Blocks; @@ -41,6 +42,9 @@ import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.GeneratorSplatter; import biomesoplenty.common.world.feature.GeneratorWaterside; import biomesoplenty.common.world.feature.tree.GeneratorBayouTree; +import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; public class BiomeGenBayou extends BOPBiome { @@ -78,7 +82,6 @@ public class BiomeGenBayou extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("willow", 3, (new GeneratorBayouTree.Builder()).log(BOPWoods.WILLOW).leaves(BOPTrees.WILLOW).minHeight(6).maxHeight(12).minLeavesRadius(1).leavesGradient(2).create()); treeGenerator.add("willow_large", 1, (new GeneratorBayouTree.Builder()).log(BOPWoods.WILLOW).leaves(BOPTrees.WILLOW).minHeight(10).maxHeight(18).minLeavesRadius(2).leavesGradient(3).create()); - this.addGenerator("dead_logs", GeneratorStage.TREE, (new GeneratorLogs.Builder()).amountPerChunk(1.5F).with(BOPWoods.DEAD).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(10.0F); @@ -129,6 +132,15 @@ public class BiomeGenBayou extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(8); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("willow", 3, (new GeneratorBayouTree.Builder()).minHeight(6).maxHeight(12).minLeavesRadius(1).leavesGradient(2).create()); + treeGenerator.add("willow_large", 1, (new GeneratorBayouTree.Builder()).minHeight(10).maxHeight(18).minLeavesRadius(2).leavesGradient(3).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java index c701ea253..18baf4502 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java @@ -104,6 +104,18 @@ public class BiomeGenBorealForest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(20); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("small_oak", 2, (new GeneratorBasicTree.Builder()).create()); + treeGenerator.add("oak", 3, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).create()); + treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).amountPerChunk(3).maxHeight(2).create()); + treeGenerator.add("yellow_autumn", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(8).create()); + treeGenerator.add("spruce", 4, (new GeneratorTaigaTree.Builder()).minHeight(10).maxHeight(19).create()); // TODO: implement pine cones + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java index f9e5b81c9..f4fa862b4 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java @@ -26,6 +26,7 @@ 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; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; public class BiomeGenBrushland extends BOPBiome @@ -88,6 +89,17 @@ public class BiomeGenBrushland extends BOPBiome if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(6.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("brush", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(3).maxHeight(5).leafLayers(2).create()); + treeGenerator.add("brush_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(1).maxHeight(2).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).create()); + treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create()); + treeGenerator.add("decaying_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(4).maxHeight(10).foliageHeight(1).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java index d41c15ebe..ca97b7e08 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java @@ -1,6 +1,7 @@ package biomesoplenty.common.biome.overworld; import net.minecraft.block.BlockFlower; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.init.Blocks; @@ -128,6 +129,15 @@ public class BiomeGenConiferousForest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("fir", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).minHeight(5).maxHeight(28).create()); + treeGenerator.add("mega_fir", 3, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).minHeight(20).maxHeight(40).trunkWidth(2).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java index aa49ff0e2..9f3aaeb5d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java @@ -8,6 +8,7 @@ package biomesoplenty.common.biome.overworld; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; @@ -99,6 +100,16 @@ public class BiomeGenDeadForest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(3); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("spruce", 3, (new GeneratorTaigaTree.Builder()).minHeight(6).maxHeight(16).create()); // TODO: implement pine cones + treeGenerator.add("dying_tree", 5, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(2).leaves(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java index e4195cf7c..05b4013f2 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java @@ -9,6 +9,7 @@ package biomesoplenty.common.biome.overworld; import net.minecraft.block.BlockDoublePlant; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; @@ -38,6 +39,7 @@ import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.GeneratorSplotches; import biomesoplenty.common.world.feature.GeneratorWaterside; import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenDeadSwamp extends BOPBiome { @@ -112,6 +114,15 @@ public class BiomeGenDeadSwamp extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(0.6F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("dying_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create()); + treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java index 2e4dadfd8..5604a4e43 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java @@ -32,6 +32,7 @@ import biomesoplenty.common.world.feature.GeneratorMixedLily; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenEucalyptusForest extends BOPBiome { @@ -56,7 +57,6 @@ public class BiomeGenEucalyptusForest extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("oak_bush", 8, (new GeneratorBush.Builder()).maxHeight(2).create()); treeGenerator.add("tall_eucalyptus", 1, (new GeneratorBulbTree.Builder()).minHeight(15).maxHeight(30).log(BOPWoods.EUCALYPTUS).leaves(BOPTrees.EUCALYPTUS).create()); - // TODO: Add Eucalyptus wood as a new wood type - the bark is quite special // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(6); @@ -102,6 +102,15 @@ public class BiomeGenEucalyptusForest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("algae"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(10); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("oak_bush", 8, (new GeneratorBush.Builder()).maxHeight(2).create()); + treeGenerator.add("tall_eucalyptus", 1, (new GeneratorBulbTree.Builder()).minHeight(15).maxHeight(30).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java index bb770738e..0e5ac680f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java @@ -104,8 +104,8 @@ public class BiomeGenFen extends BOPBiome flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder()).with(BlockFlower.EnumFlowerType.POPPY).create()); // other plants - this.addGenerator("cattails", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.CATTAIL).create()); - this.addGenerator("double_cattails", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(4.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); + this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.CATTAIL).create()); + this.addGenerator("double_cattail", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(4.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create()); this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).create()); this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.SHRUB).create()); @@ -147,6 +147,16 @@ public class BiomeGenFen extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(9); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("dark_oak_taiga", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create()); + treeGenerator.add("dying", 10, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create()); + treeGenerator.add("dead", 1, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).maxHeight(14).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java index 28bf103b9..d2a1838c9 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java @@ -10,6 +10,7 @@ package biomesoplenty.common.biome.overworld; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; @@ -37,6 +38,7 @@ import biomesoplenty.common.world.feature.GeneratorGrass; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.GeneratorSplatter; import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenFlowerIsland extends BOPBiome { @@ -112,6 +114,16 @@ public class BiomeGenFlowerIsland extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(1); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("red_big_flowers", 1, (new GeneratorBigFlower.Builder()).flowerType(GeneratorBigFlower.BigFlowerType.RED).create()); + treeGenerator.add("yellow_big_flowers", 1, (new GeneratorBigFlower.Builder()).flowerType(GeneratorBigFlower.BigFlowerType.YELLOW).create()); + treeGenerator.add("oak_bush", 2, (new GeneratorBush.Builder()).maxHeight(2).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java index 5cb944e83..5eb22ce46 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java @@ -31,6 +31,7 @@ import biomesoplenty.common.world.feature.GeneratorGrass; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBush; import biomesoplenty.common.world.feature.tree.GeneratorProfileTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenGrove extends BOPBiome { @@ -101,6 +102,16 @@ public class BiomeGenGrove extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(3); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("dark_poplar", 1, (new GeneratorProfileTree.Builder()).minHeight(6).maxHeight(14).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).profile(GeneratorProfileTree.TreeProfile.POPLAR).create()); + treeGenerator.add("poplar", 1, (new GeneratorProfileTree.Builder()).minHeight(8).maxHeight(18).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).profile(GeneratorProfileTree.TreeProfile.POPLAR).create()); + treeGenerator.add("bush", 1, (new GeneratorBush.Builder()).maxHeight(2).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java index 98cdbd3ae..bcb5f8543 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java @@ -40,6 +40,7 @@ import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; import biomesoplenty.common.world.feature.tree.GeneratorBigTree; import biomesoplenty.common.world.feature.tree.GeneratorBush; import biomesoplenty.common.world.feature.tree.GeneratorPineTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenHeathland extends BOPBiome { @@ -120,6 +121,20 @@ public class BiomeGenHeathland extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.ground, Material.grass).create(); + GeneratorWeighted treeGenerator = new GeneratorWeighted(12); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("red_bush", 7, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.BIRCH).create()); + treeGenerator.add("small_bush", 11, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create()); + treeGenerator.add("oak", 2, (new GeneratorBasicTree.Builder()).minHeight(3).maxHeight(5).create()); + treeGenerator.add("decaying_tree", 1, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).minHeight(5).maxHeight(12).foliageHeight(2).create()); + treeGenerator.add("pine", 15, (new GeneratorPineTree.Builder()).minHeight(6).maxHeight(18).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).placeOn(suitableTreePosition).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java index 2cb00864d..e7bcde1d8 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java @@ -8,6 +8,7 @@ package biomesoplenty.common.biome.overworld; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.util.BlockPos; import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; @@ -27,6 +28,7 @@ import biomesoplenty.common.world.feature.GeneratorGrass; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenLavenderFields extends BOPBiome { @@ -75,6 +77,15 @@ public class BiomeGenLavenderFields extends BOPBiome if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(1); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("jacaranda", 3, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).create()); + treeGenerator.add("oak", 1, (new GeneratorBigTree.Builder()).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java index 057207fca..4c693cdc9 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java @@ -119,6 +119,17 @@ public class BiomeGenLushDesert extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + IBlockPosQuery emptyHardenedClay = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); + GeneratorWeighted treeGenerator = new GeneratorWeighted(3); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("decaying_tree", 4, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).placeOn(emptyHardenedClay).minHeight(5).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).maxHeight(12).foliageHeight(2).create()); + treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(0.5F).placeOn(emptyHardenedClay).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("oak_bush", 5, (new GeneratorBush.Builder()).maxHeight(2).placeOn(emptyHardenedClay).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java index be67d1004..45cd83b6b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java @@ -99,6 +99,15 @@ public class BiomeGenMapleWoods extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(20); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("maple", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(5).maxHeight(10).create()); + treeGenerator.add("spruce", 2, (new GeneratorTaigaTree.Builder()).minHeight(10).maxHeight(19).create()); // TODO: implement pine cones + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java index b95be948a..f5f7d7128 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java @@ -11,6 +11,7 @@ package biomesoplenty.common.biome.overworld; import java.util.Random; import net.minecraft.block.BlockDirt; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -44,6 +45,7 @@ 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.GeneratorPineTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenMountain extends BOPBiome { @@ -170,6 +172,16 @@ public class BiomeGenMountain extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(64, 140).materials(Material.ground, Material.grass).create(); + GeneratorWeighted treeGenerator = new GeneratorWeighted(3); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("pine", 2, (new GeneratorPineTree.Builder()).minHeight(6).maxHeight(18).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).placeOn(suitableTreePosition).create()); + treeGenerator.add("oak", 1, (new GeneratorBasicTree.Builder()).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java index 0906d4a50..b56576c9a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java @@ -44,6 +44,7 @@ import biomesoplenty.common.world.feature.GeneratorLakes; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenMysticGrove extends BOPBiome { @@ -152,6 +153,17 @@ public class BiomeGenMysticGrove extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(10); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("flowering_vine", 2, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.leaves.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.vine.getDefaultState()).create()); + treeGenerator.add("magic", 9, (new GeneratorBasicTree.Builder()).create()); + treeGenerator.add("jacaranda", 1, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).create()); + treeGenerator.add("oak_large", 3, (new GeneratorBigTree.Builder()).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java index 67fcac8d7..5bf9cd96c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java @@ -106,8 +106,10 @@ public class BiomeGenOasis extends BOPBiome if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.generateBopFlowers) {this.removeGenerator("bromeliad");} + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");this.removeGenerator("desertgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java index 56a733f9e..e135ee1ea 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java @@ -121,6 +121,18 @@ public class BiomeGenOminousWoods extends BOPBiome if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(9); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("umbran_moss", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.leaves2.getStateFromMeta(BlockPlanks.EnumType.DARK_OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).minHeight(8).maxHeight(12).maxLeavesRadius(2).vine(Blocks.vine.getDefaultState()).create()); + treeGenerator.add("umbran_spruce", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).maxHeight(20).create()); // TODO: implement pine cones + treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("mega_umbran", 4, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).minHeight(20).maxHeight(30).trunkWidth(2).create()); + treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java index c22a35b6e..7445e90b6 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java @@ -25,6 +25,7 @@ import biomesoplenty.common.world.feature.tree.GeneratorBigTree; import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; import net.minecraft.block.BlockPlanks.EnumType; import net.minecraft.block.BlockFlower; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.init.Blocks; @@ -100,6 +101,14 @@ public class BiomeGenOrchard extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(4); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("oak_large", 1, (new GeneratorBigTree.Builder()).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java index 989d10ea6..164be1e06 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java @@ -32,6 +32,7 @@ import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; import biomesoplenty.common.world.feature.tree.GeneratorBush; import biomesoplenty.common.world.feature.tree.GeneratorMahoganyTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenOvergrownCliffs extends BOPBiome { @@ -94,10 +95,18 @@ public class BiomeGenOvergrownCliffs extends BOPBiome if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(40.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("mahogany", 1, (new GeneratorMahoganyTree.Builder()).minHeight(5).maxHeight(10).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).create()); + treeGenerator.add("oak_bush", 8, (new GeneratorBush.Builder()).maxHeight(2).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java index 7e4faf306..56c8e06d4 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java @@ -111,6 +111,16 @@ public class BiomeGenRainforest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(20); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("birch", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(8).create()); + treeGenerator.add("oak", 4, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).create()); + treeGenerator.add("large_oak", 1, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java index 709054245..e345ad0d1 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java @@ -39,6 +39,7 @@ 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; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenRedwoodForest extends BOPBiome { @@ -126,10 +127,18 @@ public class BiomeGenRedwoodForest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(25.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("redwood", 5, (new GeneratorRedwoodTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("oak_bush", 1, (new GeneratorBush.Builder()).maxHeight(2).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java index 31d86d60c..fc7d60c60 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java @@ -20,6 +20,7 @@ import biomesoplenty.common.world.feature.GeneratorMixedLily; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBigTree; import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; @@ -104,6 +105,12 @@ public class BiomeGenSacredSprings extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.generateBopTrees) {this.removeGenerator("sacred_oak_trees"); this.removeGenerator("large_oak"); + + this.addGenerator("sacred_oak_trees", GeneratorStage.POST, (new GeneratorBigTree.Builder()).amountPerChunk(0.2F).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(35).maxHeight(40).trunkWidth(2).foliageDensity(2.0D).create()); + this.addGenerator("large_oak", GeneratorStage.TREE, (new GeneratorBigTree.Builder()).amountPerChunk(3.0F).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java index 75e196822..23df8586f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java @@ -27,6 +27,7 @@ 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; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenSeasonalForest extends BOPBiome { @@ -114,6 +115,19 @@ public class BiomeGenSeasonalForest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(15); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("large_oak", 1, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("oak", 1, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).create()); + treeGenerator.add("yellow_autumn", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(8).create()); + treeGenerator.add("maple", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(5).maxHeight(8).create()); + treeGenerator.add("orange_autumn", 5, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).minHeight(5).maxHeight(8).create()); + treeGenerator.add("dying_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(2).leaves(BlockPlanks.EnumType.OAK).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java index 44e17c190..34e94dbff 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java @@ -142,6 +142,16 @@ public class BiomeGenShield extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(9); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("spruce", 4, (new GeneratorTaigaTree.Builder()).maxHeight(13).create()); // TODO: implement pine cones + treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create()); + treeGenerator.add("pine", 2, (new GeneratorPineTree.Builder()).minHeight(6).maxHeight(18).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java index 49549a477..20666c29b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java @@ -1,6 +1,7 @@ package biomesoplenty.common.biome.overworld; import net.minecraft.block.BlockFlower; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.init.Blocks; @@ -102,6 +103,15 @@ public class BiomeGenSnowyConiferousForest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("fir", 4, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).minHeight(5).maxHeight(28).create()); + treeGenerator.add("mega_fir", 2, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).minHeight(20).maxHeight(40).trunkWidth(2).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java index ea28c1659..28c590770 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java @@ -8,6 +8,7 @@ package biomesoplenty.common.biome.overworld; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; @@ -28,6 +29,7 @@ import biomesoplenty.common.world.feature.GeneratorGrass; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenSnowyForest extends BOPBiome @@ -86,6 +88,15 @@ public class BiomeGenSnowyForest extends BOPBiome if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(3); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("oak", 3, (new GeneratorBasicTree.Builder()).leaves(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(2).leaves(BlockPlanks.EnumType.OAK).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java index b274fbb1e..759f700eb 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java @@ -137,6 +137,17 @@ public class BiomeGenTemperateRainforest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(20.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("small_cedar", 3, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(5).maxHeight(15).create()); + treeGenerator.add("cedar", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(20).maxHeight(40).create()); + treeGenerator.add("oak_bush", 5, (new GeneratorBush.Builder()).maxHeight(2).create()); + treeGenerator.add("willow", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).leavesOffset(0).create()); + } + GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java index 8044034bb..b25a0ac45 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java @@ -29,6 +29,7 @@ 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.GeneratorMahoganyTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeGenTropicalRainforest extends BOPBiome { @@ -118,6 +119,15 @@ public class BiomeGenTropicalRainforest extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(15.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("mahogany", 6, (new GeneratorMahoganyTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).create()); + treeGenerator.add("jungle", 2, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).minHeight(8).maxHeight(12).vine(Blocks.vine.getDefaultState()).create()); + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java index 7648fc0bf..7d824de92 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java @@ -8,6 +8,7 @@ package biomesoplenty.common.biome.overworld; +import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.state.IBlockState; @@ -110,6 +111,16 @@ public class BiomeGenWasteland extends BOPBiome if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + IBlockPosQuery emptyDriedSand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); + GeneratorWeighted treeGenerator = new GeneratorWeighted(0.3F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create()); + } + if (!settings.generateBopGrasses) {this.removeGenerator("dead_grass"); this.removeGenerator("desertgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java index 563f67d1d..a3be3af78 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java @@ -143,6 +143,15 @@ public class BiomeGenWetland extends BOPBiome if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); + if (!settings.generateBopTrees) {this.removeGenerator("trees"); + + GeneratorWeighted treeGenerator = new GeneratorWeighted(7); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("willow", 3, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).minHeight(8).maxHeight(12).maxLeavesRadius(2).vine(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).leavesOffset(0).create()); + treeGenerator.add("spruce", 5, (new GeneratorTaigaTree.Builder()).maxHeight(13).create()); // TODO: implement pine cones + } + GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); if (!settings.generateBopFlowers) {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");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java index d1d9a6bc2..f571c1203 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java @@ -105,12 +105,6 @@ public class BiomeGenWoodland extends BOPBiome this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); - // logs - GeneratorWeighted logsGenerator = new GeneratorWeighted(0.5F); - this.addGenerator("logs", GeneratorStage.TREE, logsGenerator); - logsGenerator.add("oak_logs", 1, (new GeneratorLogs.Builder()).create()); - logsGenerator.add("dead_logs", 1, (new GeneratorLogs.Builder()).with(BOPWoods.DEAD).create()); - // gem this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.AMBER).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java index c5a73a5ac..f631ab058 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java @@ -1,5 +1,6 @@ package biomesoplenty.common.biome.vanilla; +import net.minecraft.block.BlockPlanks; import net.minecraft.world.biome.BiomeGenBase; import biomesoplenty.api.biome.ExtendedBiomeWrapper; import biomesoplenty.api.biome.generation.GeneratorStage; @@ -15,6 +16,7 @@ import biomesoplenty.common.world.feature.GeneratorGrass; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; public class BiomeExtExtremeHills extends ExtendedBiomeWrapper { @@ -57,6 +59,8 @@ public class BiomeExtExtremeHills extends ExtendedBiomeWrapper if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.generateBopGrasses) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java index 54d2b02a6..461e86f27 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java @@ -57,6 +57,8 @@ public class BiomeExtExtremeHillsPlus extends ExtendedBiomeWrapper if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.generateBopGrasses) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java index 3bd3ce40b..634e9531a 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java @@ -89,6 +89,8 @@ public class BiomeExtForest extends ExtendedBiomeWrapper if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.generateBopGrasses) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java index 96b47490d..ec2f01cd4 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java @@ -89,6 +89,8 @@ public class BiomeExtForestHills extends ExtendedBiomeWrapper if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.generateBopGrasses) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java index f12165a76..d05d9688a 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java @@ -52,8 +52,8 @@ public class BiomeExtSwampland extends ExtendedBiomeWrapper this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(8).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create()); // other plants - this.addGenerator("cattails", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(6.0F).with(BOPPlants.CATTAIL).create()); - this.addGenerator("double_cattails", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(8.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); + this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(6.0F).with(BOPPlants.CATTAIL).create()); + this.addGenerator("double_cattail", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(8.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.2F).with(BOPPlants.KORU).create()); // flowers @@ -92,6 +92,8 @@ public class BiomeExtSwampland extends ExtendedBiomeWrapper if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.generateBopGrasses) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java b/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java index 8b1ee7bfb..e10adb78e 100644 --- a/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java +++ b/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java @@ -76,6 +76,7 @@ public class BOPWorldSettings public float amplitude = 1.0F; public boolean generateBopGems = true; public boolean generateBopSoils = true; + public boolean generateBopTrees = true; public boolean generateBopGrasses = true; public boolean generateBopFoliage = true; public boolean generateBopFlowers = true; @@ -135,6 +136,7 @@ public class BOPWorldSettings obj.addProperty("amplitude", this.amplitude); obj.addProperty("generateBopOre", this.generateBopGems); obj.addProperty("generateBopSoils", this.generateBopSoils); + obj.addProperty("generateBopTrees", this.generateBopTrees); obj.addProperty("generateBopGrasses", this.generateBopGrasses); obj.addProperty("generateBopFoliage", this.generateBopFoliage); obj.addProperty("generateBopFlowers", this.generateBopFlowers); @@ -170,6 +172,7 @@ public class BOPWorldSettings this.amplitude = worldConfig.getFloat("amplitude", this.amplitude); this.generateBopGems = worldConfig.getBool("generateBopOre", this.generateBopGems); this.generateBopSoils = worldConfig.getBool("generateBopSoils", this.generateBopSoils); + this.generateBopTrees = worldConfig.getBool("generateBopTrees", this.generateBopTrees); this.generateBopGrasses = worldConfig.getBool("generateBopGrasses", this.generateBopGrasses); this.generateBopFoliage = worldConfig.getBool("generateBopFoliage", this.generateBopFoliage); this.generateBopFlowers = worldConfig.getBool("generateBopFlowers", this.generateBopFlowers); @@ -200,6 +203,7 @@ public class BOPWorldSettings this.amplitude = 1.0F; this.generateBopGems = true; this.generateBopSoils = true; + this.generateBopTrees = true; this.generateBopGrasses = true; this.generateBopFoliage = true; this.generateBopFlowers = true;