82 lines
4.7 KiB
Java
82 lines
4.7 KiB
Java
package biomesoplenty.common.biome.overworld;
|
|
|
|
import biomesoplenty.api.biome.BOPBiomes;
|
|
import biomesoplenty.api.block.BOPBlocks;
|
|
import biomesoplenty.api.block.BlockQueries;
|
|
import biomesoplenty.api.enums.BOPClimates;
|
|
import biomesoplenty.api.enums.BOPFoliage;
|
|
import biomesoplenty.api.enums.BOPTrees;
|
|
import biomesoplenty.api.enums.BOPWoods;
|
|
import biomesoplenty.api.generation.GeneratorStage;
|
|
import biomesoplenty.common.block.BlockBOPDirt;
|
|
import biomesoplenty.common.block.BlockBOPFlatPlant;
|
|
import biomesoplenty.common.block.BlockBOPGrass;
|
|
import biomesoplenty.common.block.BlockBOPMushroom;
|
|
import biomesoplenty.common.world.generator.GeneratorFlora;
|
|
import biomesoplenty.common.world.generator.GeneratorGrass;
|
|
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
|
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
|
import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree;
|
|
import net.minecraft.block.BlockFlower;
|
|
import net.minecraft.block.BlockTallGrass;
|
|
import net.minecraft.entity.passive.EntityRabbit;
|
|
import net.minecraft.entity.passive.EntityWolf;
|
|
import net.minecraft.init.Blocks;
|
|
|
|
public class BiomeGenConiferousForest extends BOPOverworldBiome
|
|
{
|
|
|
|
public BiomeGenConiferousForest()
|
|
{
|
|
super("coniferous_forest", new PropsBuilder("Coniferous Forest").withGuiColour(0x528F60).withTemperature(0.45F).withRainfall(0.5F));
|
|
|
|
// terrain
|
|
this.terrainSettings.avgHeight(68).heightVariation(10, 20);
|
|
|
|
this.canGenerateVillages = true;
|
|
|
|
if (BOPBiomes.gravel_beach.isPresent())
|
|
{
|
|
this.beachBiomeLocation = ((BOPOverworldBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
|
|
}
|
|
|
|
this.addWeight(BOPClimates.BOREAL, 10);
|
|
|
|
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
|
|
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
|
|
|
|
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 8, 4, 4));
|
|
this.spawnableCreatureList.add(new SpawnListEntry(EntityRabbit.class, 4, 2, 3));
|
|
|
|
// gravel
|
|
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
|
|
|
// trees
|
|
GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F);
|
|
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
|
treeGenerator.add("fir", 5, (new GeneratorTaigaTree.Builder()).log(BOPWoods.FIR).leaves(BOPTrees.FIR).minHeight(5).maxHeight(28).create());
|
|
treeGenerator.add("mega_fir", 3, (new GeneratorTaigaTree.Builder()).log(BOPWoods.FIR).leaves(BOPTrees.FIR).minHeight(20).maxHeight(40).trunkWidth(2).create());
|
|
|
|
// other plants
|
|
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.7F).placeOn(BlockQueries.darkFertile).with(BlockBOPFlatPlant.PlantType.DEADLEAFPILE).generationAttempts(64).create());
|
|
|
|
// shrooms
|
|
this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).generationAttempts(16).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create());
|
|
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).generationAttempts(16).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create());
|
|
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).generationAttempts(16).with(Blocks.RED_MUSHROOM.getDefaultState()).create());
|
|
|
|
// flowers
|
|
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.3F);
|
|
this.addGenerator("flowers", GeneratorStage.FLOWERS, flowerGenerator);
|
|
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
|
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
|
|
|
// grasses
|
|
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.7F);
|
|
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
|
grassGenerator.add("tallgrass", 4, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).generationAttempts(128).create());
|
|
grassGenerator.add("shortgrass", 3, (new GeneratorGrass.Builder()).with(BOPFoliage.SHORTGRASS).create());
|
|
grassGenerator.add("fern", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
|
|
}
|
|
}
|