Add Fungi Forest biome
This commit is contained in:
parent
bba5f1fb84
commit
5a96c1637a
4 changed files with 147 additions and 2 deletions
|
@ -37,6 +37,7 @@ public class BOPBiomes
|
|||
public static Optional<BiomeGenBase> flower_field = Optional.absent();
|
||||
public static Optional<BiomeGenBase> frost_forest = Optional.absent();
|
||||
public static Optional<BiomeGenBase> frozen_desert = Optional.absent();
|
||||
public static Optional<BiomeGenBase> fungi_forest = Optional.absent();
|
||||
public static Optional<BiomeGenBase> grassland = Optional.absent();
|
||||
public static Optional<BiomeGenBase> heathland = Optional.absent();
|
||||
public static Optional<BiomeGenBase> highland = Optional.absent();
|
||||
|
|
|
@ -50,6 +50,7 @@ public class BiomeGenDummyTemplate extends BOPBiome
|
|||
this.terrainSettings.avgHeight(64).heightVariation(6, 21).octaves(1, 1, 1, 1, 1, 1);
|
||||
|
||||
this.setColor(0xFFFFFF);
|
||||
this.skyColor = 0xFFFFFF;
|
||||
this.setEnableSnow();
|
||||
this.setTemperatureRainfall(0.5F, 0.5F);
|
||||
|
||||
|
@ -75,8 +76,8 @@ public class BiomeGenDummyTemplate extends BOPBiome
|
|||
grassGenerator.add("dunegrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DUNEGRASS).create());
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("ferns", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("doublegrass", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create());
|
||||
|
@ -100,7 +101,6 @@ public class BiomeGenDummyTemplate extends BOPBiome
|
|||
this.addGenerator("wild_rice", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.WILDRICE).create());
|
||||
this.addGenerator("witherwart", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.WITHERWART).create());
|
||||
this.addGenerator("dead_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockTallGrass.EnumType.DEAD_BUSH).create());
|
||||
this.addGenerator("ferns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockTallGrass.EnumType.FERN).create());
|
||||
this.addGenerator("eyebulbs", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPDoublePlant.DoublePlantType.EYEBULB).create());
|
||||
this.addGenerator("flax", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).create());
|
||||
this.addGenerator("tall_cattails", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create());
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
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;
|
||||
import biomesoplenty.api.biome.BOPBiome;
|
||||
import biomesoplenty.api.biome.generation.GeneratorStage;
|
||||
import biomesoplenty.api.biome.generation.GeneratorWeighted;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.enums.BOPClimates;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.world.BOPWorldSettings;
|
||||
import biomesoplenty.common.world.feature.GeneratorBigMushroom;
|
||||
import biomesoplenty.common.world.feature.GeneratorColumns;
|
||||
import biomesoplenty.common.world.feature.GeneratorFlora;
|
||||
import biomesoplenty.common.world.feature.GeneratorGrass;
|
||||
import biomesoplenty.common.world.feature.GeneratorMixedLily;
|
||||
import biomesoplenty.common.world.feature.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorBush;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorMegaJungleTree;
|
||||
|
||||
|
||||
// This class is not intended to be used in the game
|
||||
// It just contains one of every common generator, so it can be used as a template when creating new biomes - just delete lines you don't want and adjust weightings
|
||||
public class BiomeGenFungiForest extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenFungiForest()
|
||||
{
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(6, 21);
|
||||
|
||||
this.setColor(0xF0F970);
|
||||
this.skyColor = 0x73C69E;
|
||||
this.setTemperatureRainfall(0.5F, 0.5F);
|
||||
|
||||
this.addWeight(BOPClimates.WARM_TEMPERATE, 10);
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(12);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("mega_oak", 1, (new GeneratorMegaJungleTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
|
||||
treeGenerator.add("oak_bush", 1, (new GeneratorBush.Builder()).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.6F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("ferns", 4, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BOPPlants.SPROUT).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.7F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.4F).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BOPPlants.CLOVERPATCH).create());
|
||||
|
||||
// TODO: this.theBiomeDecorator.bopFeatures.generateMycelium = true;
|
||||
|
||||
// water plants
|
||||
this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(1.2F).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.4F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("swampflowers", 1, (new GeneratorFlora.Builder().with(BOPFlowers.SWAMPFLOWER).create()));
|
||||
|
||||
// shrooms
|
||||
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(Blocks.brown_mushroom.getDefaultState()).create());
|
||||
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(Blocks.red_mushroom.getDefaultState()).create());
|
||||
this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create());
|
||||
this.addGenerator("flat_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create());
|
||||
this.addGenerator("glowshrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.GLOWSHROOM).create());
|
||||
this.addGenerator("portobellos", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.9F).with(BlockBOPMushroom.MushroomType.PORTOBELLO).create());
|
||||
this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create());
|
||||
|
||||
// big mushrooms
|
||||
GeneratorWeighted mushroomGenerator = new GeneratorWeighted(6);
|
||||
this.addGenerator("fungi_forest_big_mushrooms", GeneratorStage.BIG_SHROOM, mushroomGenerator);
|
||||
mushroomGenerator.add("brown_mushroom", 1, (new GeneratorBigMushroom.Builder()).mushroomType(GeneratorBigMushroom.BigMushroomType.BROWN).create());
|
||||
mushroomGenerator.add("red_mushroom", 1, (new GeneratorBigMushroom.Builder()).mushroomType(GeneratorBigMushroom.BigMushroomType.RED).create());
|
||||
|
||||
/*
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
int x = chunkX + random.nextInt(16) + 8;
|
||||
short y = 128;
|
||||
int z = chunkZ + random.nextInt(16) + 8;
|
||||
|
||||
new WorldGenIvy().generate(world, random, x, y, z);
|
||||
}
|
||||
*/
|
||||
|
||||
// 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");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x57ED64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x57ED64;
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public float getFogDensity(int x, int y, int z)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0.6F;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
|
@ -162,6 +162,7 @@ public class ModBiomes
|
|||
flower_field = registerBOPBiome(new BiomeGenFlowerField(), "Flower Field");
|
||||
frost_forest = registerBOPBiome(new BiomeGenFrostForest(), "Frost Forest");
|
||||
frozen_desert = registerBOPBiome(new BiomeGenColdDesert(BiomeGenColdDesert.ColdDesertType.FROZEN), "Frozen Desert");
|
||||
fungi_forest = registerBOPBiome(new BiomeGenFungiForest(), "Fungi Forest");
|
||||
grassland = registerBOPBiome(new BiomeGenGrassland(), "Grassland");
|
||||
heathland = registerBOPBiome(new BiomeGenHeathland(), "Heathland");
|
||||
highland = registerBOPBiome(new BiomeGenHighland(), "Highland");
|
||||
|
|
Loading…
Reference in a new issue