From 0253add36a1fb9ceecea52cbaaeede67ae8cb72a Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Thu, 21 Jan 2016 03:46:09 -0500 Subject: [PATCH] Re-added Redwood Forest (Trees don't generate properly yet) --- .../biomesoplenty/api/biome/BOPBiomes.java | 1 + .../biome/overworld/BiomeGenMysticGrove.java | 1 + .../biome/overworld/BiomeGenOminousWoods.java | 1 + .../overworld/BiomeGenRedwoodForest.java | 83 +++++++++++++++++++ .../biome/overworld/BiomeGenWasteland.java | 1 + .../biomesoplenty/common/init/ModBiomes.java | 5 ++ src/main/resources/mcmod.info | 4 +- 7 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java index e2f30c4aa..ed6efb10d 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java @@ -62,6 +62,7 @@ public class BOPBiomes public static Optional prairie = Optional.absent(); public static Optional quagmire = Optional.absent(); public static Optional rainforest = Optional.absent(); + public static Optional redwood_forest = Optional.absent(); public static Optional sacred_springs = Optional.absent(); public static Optional seasonal_forest = Optional.absent(); public static Optional shield = Optional.absent(); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java index e2f385991..c33eae4ad 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java @@ -53,6 +53,7 @@ public class BiomeGenMysticGrove extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; + this.canSpawnInBiome = false; this.addWeight(BOPClimates.WET_TEMPERATE, 1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java index 9aedeaf38..08a7b8590 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java @@ -66,6 +66,7 @@ public class BiomeGenOminousWoods extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; + this.canSpawnInBiome = false; this.addWeight(BOPClimates.COLD_SWAMP, 1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java new file mode 100644 index 000000000..2c2d552b6 --- /dev/null +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java @@ -0,0 +1,83 @@ +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; +import biomesoplenty.api.biome.BOPBiome; +import biomesoplenty.api.biome.generation.GeneratorStage; +import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.common.block.BlockBOPCoral; +import biomesoplenty.common.block.BlockBOPDoublePlant; +import biomesoplenty.common.block.BlockBOPLilypad; +import biomesoplenty.common.block.BlockBOPMushroom; +import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.common.enums.BOPGems; +import biomesoplenty.common.enums.BOPPlants; +import biomesoplenty.common.enums.BOPTrees; +import biomesoplenty.common.enums.BOPWoods; +import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; +import biomesoplenty.common.world.BOPWorldSettings; +import biomesoplenty.common.world.feature.GeneratorDoubleFlora; +import biomesoplenty.common.world.feature.GeneratorFlora; +import biomesoplenty.common.world.feature.GeneratorGrass; +import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.feature.tree.GeneratorRedwoodTree; + +public class BiomeGenRedwoodForest extends BOPBiome +{ + + public BiomeGenRedwoodForest() + { + + // terrain + this.terrainSettings.avgHeight(63).heightVariation(5, 5).octaves(0, 1, 2, 2, 1, 0); + + this.setColor(0x6DAA3C); + this.setTemperatureRainfall(0.7F, 0.7F); + + this.canGenerateVillages = false; + + this.addWeight(BOPClimates.WARM_TEMPERATE, 7); + + // trees + // + GeneratorWeighted treeGenerator = new GeneratorWeighted(20.0F); + this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); + treeGenerator.add("redwood", 5, (new GeneratorRedwoodTree.Builder()).log(BOPWoods.REDWOOD).leaves(BOPTrees.REDWOOD).create()); + treeGenerator.add("oak_bush", 1, (new GeneratorBush.Builder()).maxHeight(2).create()); + + // other plants + this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.7F).with(BOPPlants.BUSH).create()); + this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SHRUB).create()); + this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.DEADLEAFPILE).create()); + this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.LEAFPILE).generationAttempts(64).create()); + + // shrooms + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + + // grasses + GeneratorWeighted grassGenerator = new GeneratorWeighted(10.0F); + this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator); + grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).generationAttempts(128).create()); + grassGenerator.add("mediumgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).generationAttempts(128).create()); + grassGenerator.add("wheatgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).generationAttempts(128).create()); + grassGenerator.add("dampgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).generationAttempts(128).create()); + grassGenerator.add("fern", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create()); + + // gem + this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.AMBER).create()); + + } + + @Override + public void applySettings(BOPWorldSettings settings) + { + if (!settings.generateBopGems) {this.removeGenerator("amber");} + } + +} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java index 7786f5838..84114f4c6 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java @@ -60,6 +60,7 @@ public class BiomeGenWasteland extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; + this.canSpawnInBiome = false; this.addWeight(BOPClimates.HOT_DESERT, 2); diff --git a/src/main/java/biomesoplenty/common/init/ModBiomes.java b/src/main/java/biomesoplenty/common/init/ModBiomes.java index 275240f8d..bbd9d4774 100644 --- a/src/main/java/biomesoplenty/common/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/common/init/ModBiomes.java @@ -64,6 +64,7 @@ import static biomesoplenty.api.biome.BOPBiomes.plains_extension; import static biomesoplenty.api.biome.BOPBiomes.prairie; import static biomesoplenty.api.biome.BOPBiomes.quagmire; import static biomesoplenty.api.biome.BOPBiomes.rainforest; +import static biomesoplenty.api.biome.BOPBiomes.redwood_forest; import static biomesoplenty.api.biome.BOPBiomes.roofed_forest_extension; import static biomesoplenty.api.biome.BOPBiomes.sacred_springs; import static biomesoplenty.api.biome.BOPBiomes.savanna_extension; @@ -143,6 +144,7 @@ import biomesoplenty.common.biome.overworld.BiomeGenOutback; import biomesoplenty.common.biome.overworld.BiomeGenPrairie; import biomesoplenty.common.biome.overworld.BiomeGenQuagmire; import biomesoplenty.common.biome.overworld.BiomeGenRainforest; +import biomesoplenty.common.biome.overworld.BiomeGenRedwoodForest; import biomesoplenty.common.biome.overworld.BiomeGenSacredSprings; import biomesoplenty.common.biome.overworld.BiomeGenSeasonalForest; import biomesoplenty.common.biome.overworld.BiomeGenShield; @@ -371,6 +373,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry prairie = registerBOPBiome(new BiomeGenPrairie(), "Prairie"); quagmire = registerBOPBiome(new BiomeGenQuagmire(), "Quagmire"); rainforest = registerBOPBiome(new BiomeGenRainforest(), "Rainforest"); + redwood_forest = registerBOPBiome(new BiomeGenRedwoodForest(), "Redwood Forest"); sacred_springs = registerBOPBiome(new BiomeGenSacredSprings(), "Sacred Springs"); seasonal_forest = registerBOPBiome(new BiomeGenSeasonalForest(), "Seasonal Forest"); shield = registerBOPBiome(new BiomeGenShield(), "Shield"); @@ -445,7 +448,9 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry registerBiomeToDictionary(BOPBiomes.prairie, Type.PLAINS, Type.DRY, Type.SPARSE); registerBiomeToDictionary(BOPBiomes.quagmire, Type.SWAMP, Type.WATER, Type.DEAD, Type.WET, Type.WASTELAND); registerBiomeToDictionary(BOPBiomes.rainforest, Type.JUNGLE, Type.FOREST, Type.DENSE, Type.LUSH, Type.HILLS, Type.WET); + registerBiomeToDictionary(BOPBiomes.redwood_forest, Type.FOREST, Type.DENSE, Type.LUSH); registerBiomeToDictionary(BOPBiomes.seasonal_forest, Type.FOREST, Type.DENSE, Type.LUSH); + registerBiomeToDictionary(BOPBiomes.sacred_springs, Type.MAGICAL, Type.LUSH, Type.WATER, Type.WET, Type.DENSE); registerBiomeToDictionary(BOPBiomes.shield, Type.FOREST, Type.WATER, Type.HILLS); registerBiomeToDictionary(BOPBiomes.shrubland, Type.PLAINS, Type.SPARSE, Type.DRY); registerBiomeToDictionary(BOPBiomes.snowy_coniferous_forest, Type.FOREST, Type.HILLS, Type.CONIFEROUS, Type.DENSE, Type.COLD, Type.SNOWY); diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 6e98c1320..2a7f3fcdf 100755 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -4,8 +4,8 @@ "description": "Adds over 75 new biomes, blocks, and more!", "version": "${mod_version}", "mcversion": "${minecraft_version}", - "url": "www.minecraftforum.net/topic/1495041-", + "url": "http://files.minecraftforge.net/maven/com/github/glitchfiend/biomesoplenty/BiomesOPlenty/", "authorList": ["Adubbz", "Amnet", "Cheeserolls", "Forstride", "ted80"], - "credits": "enchilado, gamax92, Soaryn, Tim Rurkowski", + "credits": "Tim Rurkowski, gamax92, and many more", "logoFile": "assets/biomesoplenty/textures/gui/logo.png" }]