Removed the Heathland biome, added the Alps Foothills biome, changed the Mangrove to a primary biome in the hot swamp climate, tweaked a lot of other biomes.

This commit is contained in:
Forstride 2017-06-10 23:44:10 -04:00
parent 3b318a6060
commit d019d127f4
26 changed files with 272 additions and 374 deletions

View file

@ -43,12 +43,12 @@ public class BOPBiomes
public static Optional<Biome> flower_field = Optional.absent();
public static Optional<Biome> grassland = Optional.absent();
public static Optional<Biome> grove = Optional.absent();
public static Optional<Biome> heathland = Optional.absent();
public static Optional<Biome> highland = Optional.absent();
public static Optional<Biome> land_of_lakes = Optional.absent();
public static Optional<Biome> lavender_fields = Optional.absent();
public static Optional<Biome> lush_desert = Optional.absent();
public static Optional<Biome> lush_swamp = Optional.absent();
public static Optional<Biome> mangrove = Optional.absent();
public static Optional<Biome> maple_woods = Optional.absent();
public static Optional<Biome> marsh = Optional.absent();
public static Optional<Biome> meadow = Optional.absent();
@ -79,12 +79,12 @@ public class BOPBiomes
public static Optional<Biome> xeric_shrubland = Optional.absent();
// edge-biomes, sub-biomes and mutated-biomes
public static Optional<Biome> alps_foothills = Optional.absent();
public static Optional<Biome> mountain_foothills = Optional.absent();
public static Optional<Biome> glacier = Optional.absent();
public static Optional<Biome> oasis = Optional.absent();
public static Optional<Biome> coral_reef = Optional.absent();
public static Optional<Biome> kelp_forest = Optional.absent();
public static Optional<Biome> mangrove = Optional.absent();
public static Optional<Biome> origin_island = Optional.absent();
public static Optional<Biome> tropical_island = Optional.absent();
public static Optional<Biome> volcanic_island = Optional.absent();

View file

@ -83,7 +83,7 @@ public enum BOPClimates {
BOPClimates.TROPICAL.addBiome(15, Biomes.JUNGLE);
BOPClimates.MEDITERANEAN.addBiome(5, Biomes.PLAINS);
BOPClimates.SAVANNA.addBiome(20, Biomes.SAVANNA);
BOPClimates.HOT_DESERT.addBiome(30, Biomes.DESERT).addBiome(10, Biomes.MESA_CLEAR_ROCK);
BOPClimates.HOT_DESERT.addBiome(30, Biomes.DESERT).addBiome(15, Biomes.MESA_CLEAR_ROCK);
BOPClimates.WASTELAND.addBiome(1, Biomes.DESERT);
BOPClimates.HELL.addBiome(150, Biomes.HELL);
}

View file

@ -8,24 +8,60 @@
package biomesoplenty.common.biome.overworld;
import com.google.common.base.CaseFormat;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.IBlockPosQuery;
import biomesoplenty.api.config.IBOPWorldSettings;
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.biome.BOPBiome.PropsBuilder;
import biomesoplenty.common.biome.overworld.BiomeGenMountain.MountainType;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorLakes;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
import biomesoplenty.common.world.generator.GeneratorWeighted;
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.passive.EntityLlama;
import net.minecraft.init.Blocks;
import net.minecraft.world.biome.Biome.SpawnListEntry;
public class BiomeGenAlps extends BOPOverworldBiome
{
public BiomeGenAlps()
public static enum AlpsType {ALPS, ALPS_FOOTHILLS}
public AlpsType type;
public BiomeGenAlps(AlpsType type)
{
super("alps", new PropsBuilder("Alps").withGuiColour(13421772).withSnowEnabled().withTemperature(-0.5F).withRainfall(0.3F));
super(type.name().toLowerCase(), new PropsBuilder(CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, type.toString())).withGuiColour(13421772).withSnowEnabled().withTemperature(-0.5F).withRainfall(0.3F));
this.type = type;
// terrain
this.terrainSettings.avgHeight(198).heightVariation(12, 12).octaves(1, 1, 2, 2, 3, 3);
switch (type)
{
case ALPS:
this.terrainSettings.avgHeight(198).heightVariation(12, 12).octaves(1, 1, 2, 2, 3, 3);
this.topBlock = Blocks.SNOW.getDefaultState();
this.fillerBlock = Blocks.SNOW.getDefaultState();
break;
case ALPS_FOOTHILLS:
this.terrainSettings.avgHeight(120).heightVariation(48, 64).octaves(0, 1, 1, 3, 1, 0);
this.hasBiomeEssence = false;
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_STONE);
this.fillerBlock = Blocks.STONE.getDefaultState();
break;
}
this.canGenerateRivers = false;
this.canSpawnInBiome = false;
@ -33,18 +69,29 @@ public class BiomeGenAlps extends BOPOverworldBiome
this.beachBiomeLocation = null;
this.addWeight(BOPClimates.TUNDRA, 3);
this.addWeight(BOPClimates.ICE_CAP, 5);
this.topBlock = Blocks.SNOW.getDefaultState();
this.fillerBlock = Blocks.SNOW.getDefaultState();
if (type == AlpsType.ALPS)
{
this.addWeight(BOPClimates.TUNDRA, 3);
this.addWeight(BOPClimates.ICE_CAP, 5);
}
this.avgDirtDepth = 8;
this.spawnableCreatureList.clear();
// hot springs
this.addGenerator("hot_springs", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).liquid(BOPBlocks.hot_spring_water).frozenLiquid((IBlockState)null).create());
// trees & logs
if (type == AlpsType.ALPS_FOOTHILLS)
{
this.spawnableCreatureList.add(new SpawnListEntry(EntityLlama.class, 5, 4, 6));
IBlockPosQuery emptyStone = BlockQuery.buildAnd().withAirAbove().states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_STONE)).create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(0.5F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("fir", 1, (new GeneratorTaigaTree.Builder()).placeOn(emptyStone).log(BOPWoods.FIR).leaves(BOPTrees.FIR).minHeight(10).maxHeight(19).create());
// hot springs
this.addGenerator("hot_springs", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).liquid(BOPBlocks.hot_spring_water).frozenLiquid((IBlockState)null).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
}
// gem
this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create());
@ -64,6 +111,15 @@ public class BiomeGenAlps extends BOPOverworldBiome
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {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.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
IBlockPosQuery emptyStone = BlockQuery.buildAnd().withAirAbove().states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_STONE)).create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(0.5F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("fir", 1, (new GeneratorTaigaTree.Builder()).placeOn(emptyStone).minHeight(10).maxHeight(19).create());
}
if (!settings.isEnabled(GeneratorType.PLANTS)) {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");}
}
}

View file

@ -138,18 +138,15 @@ if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("glowshr
super.genTerrainBlocks(world, rand, primer, x, z, noise);
}
@Override
public int getGrassColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.7D ? 0xD4DB55 : (noise < -0.3D ? 0xBBDD54 : 0xA3E053);
return 0xBBDD54;
}
@Override
public int getFoliageColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.7D ? 0xD4DB55 : (noise < -0.3D ? 0xBBDD54 : 0xA3E053);
return 0xBBDD54;
}
}

View file

@ -51,7 +51,7 @@ public class BiomeGenBog extends BOPOverworldBiome
super("bog", new PropsBuilder("Bog").withGuiColour(0xD8935F).withTemperature(0.5F).withRainfall(0.9F));
// terrain
this.terrainSettings.avgHeight(64).heightVariation(6, 20);
this.terrainSettings.avgHeight(64).heightVariation(7, 10);
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
@ -74,9 +74,6 @@ public class BiomeGenBog extends BOPOverworldBiome
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(2.5F).waterLakeForBiome(this).create());
this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).create());
// gravel
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
// mud
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());
@ -87,14 +84,13 @@ public class BiomeGenBog extends BOPOverworldBiome
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
// trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(12);
GeneratorWeighted treeGenerator = new GeneratorWeighted(5);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("dark_oak_twiglet", 3, (new GeneratorTwigletTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).minHeight(5).maxHeight(10).leafChance(0.3F, 0.9F).create());
treeGenerator.add("birch_twiglet", 1, (new GeneratorTwigletTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(10).leafChance(0.3F, 0.9F).create());
treeGenerator.add("bog_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create());
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.8F);
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.5F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("shortgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
grassGenerator.add("mediumgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
@ -105,8 +101,8 @@ public class BiomeGenBog extends BOPOverworldBiome
// other plants
this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).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("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(BOPPlants.BUSH).create());
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.SHRUB).create());
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.2F).with(BOPPlants.BUSH).create());
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.7F).with(BOPPlants.SHRUB).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).create());
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).placeOn(BlockQueries.fertile).with(BOPPlants.DEADLEAFPILE).create());
this.addGenerator("poison_ivy", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).generationAttempts(16).with(BOPPlants.POISONIVY).create());

View file

@ -8,15 +8,23 @@
package biomesoplenty.common.biome.overworld;
import java.util.Random;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.BlockQueries;
import biomesoplenty.api.block.IBlockPosQuery;
import biomesoplenty.api.config.IBOPWorldSettings;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -30,20 +38,33 @@ import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.ChunkPrimer;
public class BiomeGenChaparral extends BOPOverworldBiome
{
public IBlockState usualTopBlock;
public IBlockState usualFillerBlock;
public IBlockState alternateTopBlock;
public IBlockState alternateFillerBlock;
public BiomeGenChaparral()
{
super("chaparral", new PropsBuilder("Chaparral").withGuiColour(0xC0D85D).withTemperature(0.8F).withRainfall(0.6F));
super("chaparral", new PropsBuilder("Chaparral").withGuiColour(0xC4D675).withTemperature(0.8F).withRainfall(0.4F));
// terrain
this.terrainSettings.avgHeight(70).heightVariation(10, 20).sidewaysNoise(0.1D).octaves(1, 4, 3, 1, 1, 0);
this.terrainSettings.avgHeight(80).heightVariation(10, 20);
this.addWeight(BOPClimates.MEDITERANEAN, 10);
this.usualTopBlock = this.topBlock;
this.usualFillerBlock = this.fillerBlock;
this.alternateTopBlock = Blocks.STONE.getDefaultState();
this.alternateFillerBlock = Blocks.STONE.getDefaultState();
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
@ -54,7 +75,8 @@ public class BiomeGenChaparral extends BOPOverworldBiome
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
// stone patches
this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(15).replace(this.topBlock).with(Blocks.STONE.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
IBlockPosQuery emptyStoneOrGrass = BlockQuery.buildAnd().withAirAbove().states(this.topBlock, Blocks.STONE.getDefaultState()).create();
this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(4).splotchSize(15).replace(emptyStoneOrGrass).with(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_STONE)).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
@ -80,7 +102,7 @@ public class BiomeGenChaparral extends BOPOverworldBiome
treeGenerator.add("small_bush", 1, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create());
// other plants
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.BERRYBUSH).create());
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.BERRYBUSH).create());
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.BUSH).create());
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.SHRUB).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).create());
@ -94,6 +116,17 @@ public class BiomeGenChaparral extends BOPOverworldBiome
}
@Override
public void configure(IConfigObj conf)
{
super.configure(conf);
this.usualTopBlock = this.topBlock;
this.usualFillerBlock = this.fillerBlock;
this.alternateTopBlock = conf.getBlockState("alternateTopBlock", this.alternateTopBlock);
this.alternateFillerBlock = conf.getBlockState("alternateFillerBlock", this.alternateFillerBlock);
}
@Override
public void applySettings(IBOPWorldSettings settings)
{
@ -116,11 +149,19 @@ public class BiomeGenChaparral extends BOPOverworldBiome
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
{
this.topBlock = (noise + rand.nextDouble() * 1.0D > 2.0D) ? this.alternateTopBlock : this.usualTopBlock;
this.fillerBlock = (noise + rand.nextDouble() * 1.0D > 2.0D) ? this.alternateFillerBlock : this.usualFillerBlock;
super.genTerrainBlocks(world, rand, primer, x, z, noise);
}
@Override
public int getGrassColorAtPos(BlockPos pos)
{
return 0xC0D85D;
return 0xC4D675;
}
}

View file

@ -43,7 +43,7 @@ public class BiomeGenCrag extends BOPOverworldBiome
this.beachBiomeLocation = null;
this.addWeight(BOPClimates.COLD_SWAMP, 1);
this.addWeight(BOPClimates.COLD_SWAMP, 2);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();

View file

@ -125,15 +125,13 @@ public class BiomeGenGrove extends BOPOverworldBiome
@Override
public int getGrassColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 0x517F51 : 0x609E58;
return 0x517F51;
}
@Override
public int getFoliageColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 0x619961 : 0x75B569;
return 0x619961;
}
}

View file

@ -1,158 +0,0 @@
/*******************************************************************************
* Copyright 2015-2016, 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 biomesoplenty.api.block.BlockQueries;
import biomesoplenty.api.block.IBlockPosQuery;
import biomesoplenty.api.config.IBOPWorldSettings;
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPFlowers;
import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
import biomesoplenty.common.world.generator.GeneratorWaterside;
import biomesoplenty.common.world.generator.GeneratorWeighted;
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
import biomesoplenty.common.world.generator.tree.GeneratorBush;
import biomesoplenty.common.world.generator.tree.GeneratorPineTree;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.block.material.Material;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
public class BiomeGenHeathland extends BOPOverworldBiome
{
public BiomeGenHeathland()
{
super("heathland", new PropsBuilder("Heathland").withGuiColour(0xADAE68).withTemperature(0.75F).withRainfall(0.2F));
// terrain
this.terrainSettings.avgHeight(75).heightVariation(7, 10).octaves(0, 1, 2, 2, 1, 0).sidewaysNoise(0.1D);
this.addWeight(BOPClimates.DRY_TEMPERATE, 5);
this.canGenerateVillages = true;
// TODO: why is there SO many horses?
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(3.0F);
this.addGenerator("flowers", GeneratorStage.FLOWERS, flowerGenerator);
flowerGenerator.add("wildflower", 7, (new GeneratorFlora.Builder()).with(BOPFlowers.WILDFLOWER).create());
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
flowerGenerator.add("allium", 4, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.ALLIUM).create()));
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.5F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).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());
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
// 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(BOPTrees.MAPLE).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(BOPWoods.PINE).leaves(BOPTrees.PINE).placeOn(suitableTreePosition).create());
// other plants
this.addGenerator("thorns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BOPPlants.THORN).create());
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.5F).with(BOPPlants.BUSH).create());
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.SHRUB).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).create());
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).placeOn(BlockQueries.fertile).with(BOPPlants.DEADLEAFPILE).create());
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.REED).generationAttempts(32).create());
this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(6.0F).with(BOPPlants.DESERTGRASS).create());
// gem
this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.PERIDOT).create());
}
@Override
public void applySettings(IBOPWorldSettings settings)
{
if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("glowshrooms");}
if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("miners_delight");}
if (!settings.isEnabled(GeneratorType.ROCK_FORMATIONS)) {this.removeGenerator("stone_formations");}
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");}
if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");}
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {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");}
if (!settings.isEnabled(GeneratorType.PLANTS)) {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.isEnabled(GeneratorType.WATER_PLANTS)) {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.isEnabled(GeneratorType.TREES)) {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.isEnabled(GeneratorType.FLOWERS)) {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.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");}
}
@Override
public int getGrassColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 0xAD9D68 : 0xADAE68;
}
@Override
public int getFoliageColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 0xB6A763 : 0xB6C663;
}
}

View file

@ -31,7 +31,7 @@ public class BiomeGenHighland extends BOPOverworldBiome
super("highland", new PropsBuilder("Highland").withGuiColour(0x7CAD66).withTemperature(0.55F).withRainfall(0.8F));
// terrain
this.terrainSettings.avgHeight(120).heightVariation(25, 25);
this.terrainSettings.avgHeight(100).heightVariation(35, 35).octaves(0, 1, 1, 3, 1, 0);
this.canGenerateRivers = false;
this.canGenerateVillages = false;

View file

@ -17,9 +17,11 @@ import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPFlowers;
import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorColumns;
@ -27,10 +29,12 @@ import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorLakes;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
import biomesoplenty.common.world.generator.GeneratorSplatter;
import biomesoplenty.common.world.generator.GeneratorWaterside;
import biomesoplenty.common.world.generator.GeneratorWeighted;
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
import biomesoplenty.common.world.generator.tree.GeneratorBush;
import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
@ -40,10 +44,10 @@ public class BiomeGenLushDesert extends BOPOverworldBiome
{
public BiomeGenLushDesert()
{
super("lush_desert", new PropsBuilder("Lush Desert").withGuiColour(0x8AA92D).withTemperature(1.2F).withRainfall(0.5F));
super("lush_desert", new PropsBuilder("Lush Desert").withGuiColour(0x8AA92D).withTemperature(1.2F).withRainfall(0.4F));
// terrain
this.terrainSettings.avgHeight(64).heightVariation(4, 15);
this.terrainSettings.avgHeight(63).heightVariation(8, 40).octaves(2, 2, 1, 0, 1, 1);
this.topBlock = Blocks.HARDENED_CLAY.getDefaultState();
this.fillerBlock = Blocks.HARDENED_CLAY.getDefaultState();
@ -51,33 +55,35 @@ public class BiomeGenLushDesert extends BOPOverworldBiome
this.canSpawnInBiome = false;
this.canGenerateVillages = true;
this.addWeight(BOPClimates.HOT_DESERT, 5);
this.addWeight(BOPClimates.SAVANNA, 2);
// trees
IBlockPosQuery emptyHardenedClay = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(3);
IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(62, 68).states(this.topBlock).withAirAbove().create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(4);
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(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create());
treeGenerator.add("oak_bush", 5, (new GeneratorBush.Builder()).maxHeight(2).placeOn(emptyHardenedClay).create());
treeGenerator.add("decaying_tree", 3, (new GeneratorBigTree.Builder()).placeOn(suitableTreePosition).minHeight(5).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).maxHeight(12).foliageHeight(3).create());
treeGenerator.add("twiglet", 5, (new GeneratorTwigletTree.Builder()).placeOn(suitableTreePosition).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).placeOn(suitableTreePosition).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create());
this.addGenerator("grass_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(4.0F).generationAttempts(128).replace(suitableTreePosition).with(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SANDY)).create());
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(5).maxRadius(7).replace(Blocks.HARDENED_CLAY.getDefaultState()).with(Blocks.SAND.getDefaultState()).create());
// oases
this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(10).maxRadius(7).replace(Blocks.HARDENED_CLAY.getDefaultState()).with(Blocks.GRASS.getDefaultState()).create());
this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(10).maxRadius(7).replace(Blocks.HARDENED_CLAY.getDefaultState()).with(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SANDY)).create());
// lakes
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.5F).waterLakeForBiome(this).create());
// other plants
this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(0.8F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create());
this.addGenerator("bromeliad", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder().amountPerChunk(0.5F).with(BOPFlowers.BROMELIAD).generationAttempts(8).create()));
this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(1.8F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create());
this.addGenerator("bromeliad", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder().amountPerChunk(0.2F).with(BOPFlowers.BROMELIAD).generationAttempts(8).create()));
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.75F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).generationAttempts(32).create());
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.BUSH).create());
this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.9F).with(BOPPlants.TINYCACTUS).create());
this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(Blocks.DEADBUSH.getDefaultState()).create());
this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.5F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create());
this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.TINYCACTUS).create());
this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(Blocks.DEADBUSH.getDefaultState()).create());
this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.2F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create());
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(4.0F);

View file

@ -14,16 +14,18 @@ import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.IBlockPosQuery;
import biomesoplenty.api.config.IBOPWorldSettings;
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorLakes;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
import biomesoplenty.common.world.generator.GeneratorWeighted;
import biomesoplenty.common.world.generator.tree.GeneratorMangroveTree;
import net.minecraft.block.BlockOldLeaf;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
@ -33,22 +35,19 @@ import net.minecraft.world.chunk.ChunkPrimer;
public class BiomeGenMangrove extends BOPOverworldBiome
{
public IBlockState usualTopBlock;
public IBlockState alternateTopBlock;
public BiomeGenMangrove()
{
super("mangrove", new PropsBuilder("Mangrove").withTemperature(0.8F).withRainfall(0.3F).withGuiColour(7251289).withWaterColor(0xCDFF51));
// terrain
this.terrainSettings.avgHeight(62).heightVariation(2, 4).octaves(0, 1, 2, 2, 1, 0);
this.terrainSettings.avgHeight(62).heightVariation(8, 2).octaves(0, 1, 2, 2, 1, 0);
this.addWeight(BOPClimates.HOT_SWAMP, 7);
this.seaFloorBlock = BOPBlocks.mud.getDefaultState();
this.topBlock = BOPBlocks.mud.getDefaultState();
this.fillerBlock = BOPBlocks.mud.getDefaultState();
this.usualTopBlock = this.topBlock;
this.alternateTopBlock = Blocks.SAND.getDefaultState();
this.canSpawnInBiome = false;
this.canGenerateVillages = false;
@ -58,30 +57,19 @@ public class BiomeGenMangrove extends BOPOverworldBiome
this.beachBiomeLocation = null;
clearWeights();
// quicksand
this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).liquid(BOPBlocks.sand).frozenLiquid((IBlockState)null).create());
// trees & logs
IBlockPosQuery emptySandMud = BlockQuery.buildAnd().states(this.usualTopBlock).create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(7);
IBlockPosQuery emptyMud = BlockQuery.buildAnd().states(this.topBlock).create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(5);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("mangrove", 1, (new GeneratorMangroveTree.Builder()).placeOn(emptySandMud).log(BOPWoods.MANGROVE).leaves(BOPTrees.MANGROVE).create());
treeGenerator.add("mangrove", 1, (new GeneratorMangroveTree.Builder()).placeOn(emptyMud).log(BOPWoods.MANGROVE).leaves(BOPTrees.MANGROVE).create());
// gem
this.addGenerator("sapphire", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.SAPPHIRE).create());
}
@Override
public void configure(IConfigObj conf)
{
super.configure(conf);
this.usualTopBlock = this.topBlock;
this.alternateTopBlock = conf.getBlockState("alternateTopBlock", this.alternateTopBlock);
}
@Override
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
{
@ -105,8 +93,6 @@ public class BiomeGenMangrove extends BOPOverworldBiome
}
}
}
this.topBlock = (noise + rand.nextDouble() * 1.0D > 1.8D) ? this.alternateTopBlock : this.usualTopBlock;
this.generateBiomeTerrain(world, rand, primer, x, z, noise);
}
@ -125,10 +111,10 @@ public class BiomeGenMangrove extends BOPOverworldBiome
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
GeneratorWeighted treeGenerator = new GeneratorWeighted(7.0F);
IBlockPosQuery emptySandMud = BlockQuery.buildAnd().states(this.usualTopBlock).create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(5);
IBlockPosQuery emptyMud = BlockQuery.buildAnd().states(this.topBlock).create();
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("mangrove", 1, (new GeneratorMangroveTree.Builder()).placeOn(emptySandMud).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
treeGenerator.add("mangrove", 1, (new GeneratorMangroveTree.Builder()).placeOn(emptyMud).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
}
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {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");}

View file

@ -48,10 +48,10 @@ public class BiomeGenMapleWoods extends BOPOverworldBiome
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
// trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(20);
GeneratorWeighted treeGenerator = new GeneratorWeighted(15);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("maple", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BOPTrees.MAPLE).minHeight(5).maxHeight(10).create());
treeGenerator.add("spruce", 2, (new GeneratorTaigaTree.Builder()).minHeight(10).maxHeight(19).create()); // TODO: implement pine cones
treeGenerator.add("maple", 5, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BOPTrees.MAPLE).minHeight(5).maxHeight(10).create());
treeGenerator.add("spruce", 1, (new GeneratorTaigaTree.Builder()).minHeight(10).maxHeight(19).create()); // TODO: implement pine cones
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.2F);

View file

@ -95,10 +95,10 @@ public class BiomeGenMeadow extends BOPOverworldBiome
// water plants
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(Blocks.WATERLILY.getDefaultState()).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.FLOWER).create());
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.75F).with(BlockBOPLilypad.LilypadType.TINY).create());
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.SMALL).create());
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.TINY).create());
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create());

View file

@ -51,7 +51,7 @@ import net.minecraft.world.chunk.ChunkPrimer;
public class BiomeGenMountain extends BOPOverworldBiome
{
public static enum MountainType {PEAKS, FOOTHILLS}
public static enum MountainType {MOUNTAIN, MOUNTAIN_FOOTHILLS}
public MountainType type;
public IBlockState grassBlock;
@ -61,8 +61,8 @@ public class BiomeGenMountain extends BOPOverworldBiome
public BiomeGenMountain(MountainType type)
{
super("mountain_" + type.name().toLowerCase(), new PropsBuilder("Mountain " + CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, type.toString())).withGuiColour(0x80A355).withTemperature(0.8F).withRainfall(0.1F));
super(type.name().toLowerCase(), new PropsBuilder(CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, type.toString())).withGuiColour(0x80A355).withTemperature(0.5F).withRainfall(0.1F));
this.type = type;
this.canSpawnInBiome = false;
@ -70,11 +70,11 @@ public class BiomeGenMountain extends BOPOverworldBiome
// terrain
switch (type)
{
case PEAKS:
case MOUNTAIN:
this.terrainSettings.avgHeight(140).heightVariation(30, 60).octaves(1, 1, 2, 2, 3, 3).sidewaysNoise(0.1D);
break;
case FOOTHILLS:
case MOUNTAIN_FOOTHILLS:
this.terrainSettings.avgHeight(100).heightVariation(15, 30).octaves(0, 1, 1, 3, 1, 0).sidewaysNoise(0.1D);
this.hasBiomeEssence = false;
break;
@ -86,7 +86,7 @@ public class BiomeGenMountain extends BOPOverworldBiome
this.beachBiomeLocation = null;
if (type == MountainType.PEAKS)
if (type == MountainType.MOUNTAIN)
{
this.canGenerateVillages = false;
@ -102,14 +102,9 @@ public class BiomeGenMountain extends BOPOverworldBiome
this.topBlock = Blocks.GRASS.getDefaultState();
this.fillerBlock = Blocks.DIRT.getDefaultState();
this.grassBlock = this.topBlock;
this.dirtBlock = this.fillerBlock;
this.coarseDirtBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT);
this.stoneBlock = Blocks.STONE.getDefaultState();
// gravel
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
this.addGenerator("gravel_patches", GeneratorStage.SAND_PASS2, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(16).replace(this.topBlock).with(Blocks.GRAVEL.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
// lakes
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.8F).waterLakeForBiome(this).create());
@ -131,15 +126,14 @@ public class BiomeGenMountain extends BOPOverworldBiome
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).generationAttempts(128).create());
// other plants
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.SHRUB).generationAttempts(type == MountainType.FOOTHILLS ? 64 : 32).create());
this.addGenerator("ferns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BlockTallGrass.EnumType.FERN).generationAttempts(type == MountainType.FOOTHILLS ? 64 : 32).create());
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.SHRUB).generationAttempts(type == MountainType.MOUNTAIN_FOOTHILLS ? 64 : 32).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).create());
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.2F).placeOn(BlockQueries.fertile).with(BOPPlants.DEADLEAFPILE).create());
if (type == MountainType.FOOTHILLS)
if (type == MountainType.MOUNTAIN_FOOTHILLS)
{
this.addGenerator("flax", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).create());
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.BERRYBUSH).create());
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.BERRYBUSH).create());
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BOPPlants.REED).generationAttempts(32).create());
}
@ -150,19 +144,6 @@ public class BiomeGenMountain extends BOPOverworldBiome
}
@Override
public void configure(IConfigObj conf)
{
super.configure(conf);
this.grassBlock = this.topBlock;
this.dirtBlock = this.fillerBlock;
this.coarseDirtBlock = conf.getBlockState("coarseDirtBlock", this.coarseDirtBlock);
this.stoneBlock = conf.getBlockState("stoneBlock", this.stoneBlock);
//this.snowBlock = conf.getBlockState("snowBlock", this.snowBlock);
//this.packedSnowBlock = conf.getBlockState("packedSnowBlock", this.packedSnowBlock);
}
@Override
public void applySettings(IBOPWorldSettings settings)
{
@ -194,50 +175,4 @@ public class BiomeGenMountain extends BOPOverworldBiome
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
{
int localX = x & 15;
int localZ = z & 15;
int height = 255;
while (height > 0 && primer.getBlockState(localX, height, localZ).getMaterial() == Material.AIR) {height--;}
int peakLine = 140 + (int)(noise * 5);
if (height > peakLine)
{
if (noise > 1.7D)
{
this.topBlock = this.stoneBlock;
this.fillerBlock = this.stoneBlock;
}
else
{
this.topBlock = this.grassBlock;
this.fillerBlock = this.dirtBlock;
}
}
else
{
if (noise < -1.4D)
{
this.topBlock = this.coarseDirtBlock;
this.fillerBlock = this.coarseDirtBlock;
}
else if (this.type == MountainType.PEAKS && noise > 1.7D)
{
this.topBlock = this.stoneBlock;
this.fillerBlock = this.stoneBlock;
}
else
{
this.topBlock = this.grassBlock;
this.fillerBlock = this.dirtBlock;
}
}
super.genTerrainBlocks(world, rand, primer, x, z, noise);
}
}

View file

@ -21,6 +21,7 @@ import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorColumns;
@ -65,7 +66,7 @@ public class BiomeGenOasis extends BOPOverworldBiome
clearWeights();
// oases
this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(20).maxRadius(7).replace(Blocks.SAND.getDefaultState()).with(Blocks.GRASS.getDefaultState()).create());
this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(20).maxRadius(7).replace(Blocks.SAND.getDefaultState()).with(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SANDY)).create());
// lakes
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.5F).waterLakeForBiome(this).create());

View file

@ -8,12 +8,18 @@
package biomesoplenty.common.biome.overworld;
import java.util.Random;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.config.IBOPWorldSettings;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPFlowers;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
@ -24,11 +30,19 @@ import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree;
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;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.ChunkPrimer;
public class BiomeGenOvergrownCliffs extends BOPOverworldBiome
{
public IBlockState usualTopBlock;
public IBlockState usualFillerBlock;
public IBlockState alternateTopBlock;
public IBlockState alternateFillerBlock;
public BiomeGenOvergrownCliffs()
{
super("overgrown_cliffs", new PropsBuilder("Overgrown Cliffs").withGuiColour(8373350).withTemperature(0.95F).withRainfall(0.75F));
@ -40,6 +54,13 @@ public class BiomeGenOvergrownCliffs extends BOPOverworldBiome
this.canSpawnInBiome = false;
this.canGenerateVillages = false;
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_STONE);
this.fillerBlock = Blocks.STONE.getDefaultState();
this.usualTopBlock = this.topBlock;
this.usualFillerBlock = this.fillerBlock;
this.alternateTopBlock = Blocks.GRASS.getDefaultState();
this.alternateFillerBlock = Blocks.DIRT.getDefaultState();
this.addWeight(BOPClimates.TROPICAL, 2);
this.beachBiomeLocation = null;
@ -78,6 +99,17 @@ public class BiomeGenOvergrownCliffs extends BOPOverworldBiome
}
@Override
public void configure(IConfigObj conf)
{
super.configure(conf);
this.usualTopBlock = this.topBlock;
this.usualFillerBlock = this.fillerBlock;
this.alternateTopBlock = conf.getBlockState("alternateTopBlock", this.alternateTopBlock);
this.alternateFillerBlock = conf.getBlockState("alternateFillerBlock", this.alternateFillerBlock);
}
@Override
public void applySettings(IBOPWorldSettings settings)
{
@ -107,4 +139,12 @@ public class BiomeGenOvergrownCliffs extends BOPOverworldBiome
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
{
this.topBlock = (noise + rand.nextDouble() * 1.0D > 1.8D) ? this.alternateTopBlock : this.usualTopBlock;
this.fillerBlock = (noise + rand.nextDouble() * 1.0D > 1.8D) ? this.alternateFillerBlock : this.usualFillerBlock;
super.genTerrainBlocks(world, rand, primer, x, z, noise);
}
}

View file

@ -59,7 +59,7 @@ public class BiomeGenRedwoodForest extends BOPOverworldBiome
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
// trees
GeneratorWeighted treeGenerator = new GeneratorWeighted(15.0F);
GeneratorWeighted treeGenerator = new GeneratorWeighted(17.0F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("redwood", 3, (new GeneratorRedwoodTree.Builder()).log(BOPWoods.REDWOOD).leaves(BOPTrees.REDWOOD).create());
treeGenerator.add("redwood_thin", 1, (new GeneratorRedwoodTreeThin.Builder()).log(BOPWoods.REDWOOD).leaves(BOPTrees.REDWOOD).create());

View file

@ -39,7 +39,7 @@ public class BiomeGenSacredSprings extends BOPOverworldBiome
super("sacred_springs", new PropsBuilder("Sacred Springs").withGuiColour(39259).withTemperature(0.8F).withRainfall(0.9F));
// terrain
this.terrainSettings.avgHeight(62).heightVariation(11, 45);
this.terrainSettings.avgHeight(64).heightVariation(10, 10);
this.canSpawnInBiome = false;
this.canGenerateRivers = false;
@ -55,7 +55,7 @@ public class BiomeGenSacredSprings extends BOPOverworldBiome
this.addGenerator("hot_springs", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).liquid(BOPBlocks.hot_spring_water).frozenLiquid((IBlockState)null).create());
// trees
this.addGenerator("sacred_oak_trees", GeneratorStage.POST, (new GeneratorBigTree.Builder()).amountPerChunk(0.2F).log(BOPWoods.SACRED_OAK).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.SACRED_OAK).withProperty(BlockOldLeaf.DECAYABLE, Boolean.valueOf(false))).minHeight(35).maxHeight(40).trunkWidth(2).foliageDensity(2.0D).create());
this.addGenerator("sacred_oak_trees", GeneratorStage.POST, (new GeneratorBigTree.Builder()).amountPerChunk(0.4F).log(BOPWoods.SACRED_OAK).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.SACRED_OAK).withProperty(BlockOldLeaf.DECAYABLE, Boolean.valueOf(false))).minHeight(35).maxHeight(40).trunkWidth(2).foliageDensity(2.0D).create());
this.addGenerator("leaves_clusters", GeneratorStage.TREE, (new GeneratorBush.Builder()).amountPerChunk(12.5F).maxHeight(2).create());
this.addGenerator("large_oak", GeneratorStage.TREE, (new GeneratorBigTree.Builder()).amountPerChunk(3.0F).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).altLeaves(BOPTrees.FLOWERING).create());
@ -126,14 +126,12 @@ public class BiomeGenSacredSprings extends BOPOverworldBiome
@Override
public int getGrassColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 39285 : 39259;
return 39285;
}
@Override
public int getFoliageColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 39285 : 39259;
return 39285;
}
}

View file

@ -34,6 +34,7 @@ import net.minecraft.block.BlockOldLeaf;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
public class BiomeGenTropicalIsland extends BOPOverworldBiome
{

View file

@ -139,14 +139,12 @@ public class BiomeGenTropicalRainforest extends BOPOverworldBiome
@Override
public int getGrassColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 11002176 : 12836929;
return 0xA7E140;
}
@Override
public int getFoliageColorAtPos(BlockPos pos)
{
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
return noise < -0.1D ? 8970560 : 10870849;
return 0x88E140;
}
}

View file

@ -59,7 +59,7 @@ public class BiomeGenTundra extends BOPOverworldBiome
this.spawnableCreatureList.clear();
// boulders
this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.GRASS).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(0.0F).maxRadius(3.0F).numBalls(3).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.GRASS).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(1.0F).maxRadius(3.0F).numBalls(3).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
// gravel
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(12).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
@ -68,10 +68,10 @@ public class BiomeGenTundra extends BOPOverworldBiome
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.3F).waterLakeForBiome(this).create());
// trees
this.addGenerator("trees", GeneratorStage.TREE, (new GeneratorBush.Builder()).amountPerChunk(1.5F).maxHeight(2).create());
this.addGenerator("trees", GeneratorStage.TREE, (new GeneratorBush.Builder()).amountPerChunk(0.7F).maxHeight(2).create());
// other plants
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.SHRUB).create());
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.SHRUB).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).placeOn(BlockQueries.fertile).with(BOPPlants.LEAFPILE).generationAttempts(64).create());
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).placeOn(BlockQueries.fertile).with(BOPPlants.DEADLEAFPILE).generationAttempts(64).create());
@ -84,11 +84,11 @@ public class BiomeGenTundra extends BOPOverworldBiome
flowerGenerator.add("violet", 1, (new GeneratorFlora.Builder().with(BOPFlowers.VIOLET).create()));
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.1F);
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.3F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("shortgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
grassGenerator.add("tallgrass", 4, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
grassGenerator.add("shortgrass", 4, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
grassGenerator.add("mediumgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
// gem
this.addGenerator("tanzanite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TANZANITE).create());

View file

@ -56,29 +56,29 @@ public class BiomeGenXericShrubland extends BOPOverworldBiome
this.canSpawnInBiome = false;
this.canGenerateVillages = true;
this.addWeight(BOPClimates.SAVANNA, 1);
this.addWeight(BOPClimates.HOT_DESERT, 3);
this.spawnableCreatureList.clear();
// trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(5.0F);
GeneratorWeighted treeGenerator = new GeneratorWeighted(2.0F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("brush_twiglet", 1, (new GeneratorTwigletTree.Builder()).placeOn(this.topBlock).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.ACACIA).create());
treeGenerator.add("oak_bush", 2, (new GeneratorBush.Builder()).maxHeight(2).create());
treeGenerator.add("brush_twiglet", 2, (new GeneratorTwigletTree.Builder()).placeOn(this.topBlock).minHeight(1).maxHeight(2).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).create());
treeGenerator.add("brush_bush", 1, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.ACACIA).create());
treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create());
// other plants
this.addGenerator("dunegrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(6.0F).with(BOPPlants.DUNEGRASS).generationAttempts(8).create());
this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(12.0F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create());
this.addGenerator("desert_sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BOPPlants.DESERTSPROUTS).generationAttempts(8).create());
this.addGenerator("dunegrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(30.0F).with(BOPPlants.DUNEGRASS).generationAttempts(8).create());
this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(1.2F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create());
this.addGenerator("desert_sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(5.5F).with(BOPPlants.DESERTSPROUTS).generationAttempts(8).create());
this.addGenerator("bromeliad", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder().amountPerChunk(0.5F).with(BOPFlowers.BROMELIAD).generationAttempts(8).create()));
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.BUSH).create());
this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.9F).with(BOPPlants.TINYCACTUS).create());
this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(Blocks.DEADBUSH.getDefaultState()).create());
this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.5F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create());
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.8F).with(BOPPlants.BUSH).create());
this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.TINYCACTUS).create());
this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.DEADBUSH.getDefaultState()).create());
this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create());
// grasses (note weighting must be quite high as the grasses will only grow on the splattered grass blocks)
GeneratorWeighted grassGenerator = new GeneratorWeighted(12.0F);
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.8F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("shortgrass", 7, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
grassGenerator.add("mediumgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
@ -125,7 +125,7 @@ public class BiomeGenXericShrubland extends BOPOverworldBiome
@Override
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
{
this.topBlock = (noise + rand.nextDouble() * 1.0D > 1.8D) ? this.alternateTopBlock : this.usualTopBlock;
this.topBlock = (noise + rand.nextDouble() * 1.0D > 2.5D) ? this.alternateTopBlock : this.usualTopBlock;
super.genTerrainBlocks(world, rand, primer, x, z, noise);
}

View file

@ -20,6 +20,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.io.FileUtils;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
@ -58,7 +60,6 @@ import biomesoplenty.common.biome.overworld.BiomeGenGlacier;
import biomesoplenty.common.biome.overworld.BiomeGenGrassland;
import biomesoplenty.common.biome.overworld.BiomeGenGravelBeach;
import biomesoplenty.common.biome.overworld.BiomeGenGrove;
import biomesoplenty.common.biome.overworld.BiomeGenHeathland;
import biomesoplenty.common.biome.overworld.BiomeGenHighland;
import biomesoplenty.common.biome.overworld.BiomeGenKelpForest;
import biomesoplenty.common.biome.overworld.BiomeGenLandOfLakes;
@ -141,7 +142,6 @@ import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeDictionary.Type;
import net.minecraftforge.common.BiomeManager;
import net.minecraftforge.common.DimensionManager;
import org.apache.commons.io.FileUtils;
public class ModBiomes implements BOPBiomes.IBiomeRegistry
{
@ -264,7 +264,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
white_beach = registerOverworldBiome(new BiomeGenWhiteBeach());
// normal biomes which have weights
alps = registerOverworldBiome(new BiomeGenAlps());
alps = registerOverworldBiome(new BiomeGenAlps(BiomeGenAlps.AlpsType.ALPS));
bamboo_forest = registerOverworldBiome(new BiomeGenBambooForest());
bayou = registerOverworldBiome(new BiomeGenBayou());
bog = registerOverworldBiome(new BiomeGenBog());
@ -282,17 +282,17 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
flower_field = registerOverworldBiome(new BiomeGenFlowerField());
grassland = registerOverworldBiome(new BiomeGenGrassland());
grove = registerOverworldBiome(new BiomeGenGrove());
heathland = registerOverworldBiome(new BiomeGenHeathland());
highland = registerOverworldBiome(new BiomeGenHighland());
land_of_lakes = registerOverworldBiome(new BiomeGenLandOfLakes());
lavender_fields = registerOverworldBiome(new BiomeGenLavenderFields());
lush_desert = registerOverworldBiome(new BiomeGenLushDesert());
lush_swamp = registerOverworldBiome(new BiomeGenLushSwamp());
mangrove = registerOverworldBiome(new BiomeGenMangrove());
maple_woods = registerOverworldBiome(new BiomeGenMapleWoods());
marsh = registerOverworldBiome(new BiomeGenMarsh());
meadow = registerOverworldBiome(new BiomeGenMeadow());
moor = registerOverworldBiome(new BiomeGenMoor());
mountain = registerOverworldBiome(new BiomeGenMountain(BiomeGenMountain.MountainType.PEAKS));
mountain = registerOverworldBiome(new BiomeGenMountain(BiomeGenMountain.MountainType.MOUNTAIN));
mystic_grove = registerOverworldBiome(new BiomeGenMysticGrove());
ominous_woods = registerOverworldBiome(new BiomeGenOminousWoods());
orchard = registerOverworldBiome(new BiomeGenOrchard());
@ -319,7 +319,8 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
// edge-biomes, sub-biomes and mutated-biomes
mountain_foothills = registerOverworldBiome(new BiomeGenMountain(BiomeGenMountain.MountainType.FOOTHILLS));
alps_foothills = registerOverworldBiome(new BiomeGenAlps(BiomeGenAlps.AlpsType.ALPS_FOOTHILLS));
mountain_foothills = registerOverworldBiome(new BiomeGenMountain(BiomeGenMountain.MountainType.MOUNTAIN_FOOTHILLS));
glacier = registerOverworldBiome(new BiomeGenGlacier());
oasis = registerOverworldBiome(new BiomeGenOasis());
coral_reef = registerOverworldBiome(new BiomeGenCoralReef());
@ -332,7 +333,6 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
// island biomes
mangrove = registerOverworldBiome(new BiomeGenMangrove());
origin_island = registerOverworldBiome(new BiomeGenOriginIsland());
tropical_island = registerOverworldBiome(new BiomeGenTropicalIsland());
volcanic_island = registerOverworldBiome(new BiomeGenVolcanicIsland());
@ -342,7 +342,6 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
addIslandBiome(tropical_island, 3);
addIslandBiome(volcanic_island, 5);
addIslandBiome(flower_island, 7);
addIslandBiome(mangrove, 10);
// nether biomes
corrupted_sands = registerNetherBiome(new BiomeCorruptedSands());
@ -409,13 +408,13 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
registerBiomeToDictionary(BOPBiomes.fen, Type.SWAMP, Type.FOREST, Type.COLD, Type.DEAD, Type.WET, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.flower_field, Type.PLAINS, Type.LUSH);
registerBiomeToDictionary(BOPBiomes.grassland, Type.PLAINS, Type.HILLS, Type.WET);
registerBiomeToDictionary(BOPBiomes.grove, Type.FOREST, Type.PLAINS, Type.LUSH, Type.WET, Type.SPARSE);
registerBiomeToDictionary(BOPBiomes.heathland, Type.PLAINS, Type.FOREST, Type.DRY, Type.SPARSE);
registerBiomeToDictionary(BOPBiomes.grove, Type.FOREST, Type.PLAINS, Type.LUSH, Type.WET, Type.SPARSE);
registerBiomeToDictionary(BOPBiomes.highland, Type.MOUNTAIN, Type.HILLS, Type.WET);
registerBiomeToDictionary(BOPBiomes.land_of_lakes, Type.FOREST, Type.SWAMP, Type.WET, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.lavender_fields, Type.PLAINS, Type.MAGICAL, Type.LUSH);
registerBiomeToDictionary(BOPBiomes.lush_desert, Type.SANDY, Type.HOT, Type.SAVANNA, Type.LUSH, Type.DRY, Type.SPARSE);
registerBiomeToDictionary(BOPBiomes.lush_swamp, Type.SWAMP, Type.LUSH, Type.WET, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.mangrove, Type.WATER, Type.SWAMP, Type.LUSH, Type.WET, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.maple_woods, Type.FOREST, Type.CONIFEROUS, Type.COLD, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.marsh, Type.SWAMP, Type.WET, Type.LUSH);
registerBiomeToDictionary(BOPBiomes.meadow, Type.PLAINS, Type.FOREST, Type.LUSH, Type.COLD, Type.WET, Type.SPARSE);
@ -451,12 +450,12 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
registerBiomeToDictionary(BOPBiomes.oasis, Type.SANDY, Type.LUSH, Type.JUNGLE, Type.HOT, Type.WET, Type.SPARSE);
registerBiomeToDictionary(BOPBiomes.coral_reef, Type.WATER, Type.OCEAN);
registerBiomeToDictionary(BOPBiomes.kelp_forest, Type.WATER, Type.OCEAN);
registerBiomeToDictionary(BOPBiomes.mangrove, Type.WATER, Type.OCEAN, Type.FOREST, Type.LUSH, Type.WET, Type.DENSE);
//Origin Island not tagged purposely
registerBiomeToDictionary(BOPBiomes.tropical_island, Type.WATER, Type.OCEAN, Type.JUNGLE, Type.LUSH, Type.WET, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.volcanic_island, Type.WATER, Type.OCEAN, Type.DEAD, Type.WASTELAND, Type.MOUNTAIN, Type.HOT, Type.DRY);
registerBiomeToDictionary(BOPBiomes.flower_island, Type.WATER, Type.OCEAN, Type.PLAINS, Type.LUSH, Type.DENSE, Type.MAGICAL);
registerBiomeToDictionary(BOPBiomes.origin_island, Type.OCEAN, Type.FOREST, Type.RARE);
registerBiomeToDictionary(BOPBiomes.tropical_island, Type.WATER, Type.JUNGLE, Type.LUSH, Type.WET, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.volcanic_island, Type.WATER, Type.DEAD, Type.WASTELAND, Type.MOUNTAIN, Type.HOT, Type.DRY);
registerBiomeToDictionary(BOPBiomes.flower_island, Type.WATER, Type.PLAINS, Type.LUSH, Type.DENSE, Type.MAGICAL);
registerBiomeToDictionary(BOPBiomes.origin_island, Type.WATER, Type.FOREST, Type.RARE);
registerBiomeToDictionary(BOPBiomes.gravel_beach, Type.BEACH);
registerBiomeToDictionary(BOPBiomes.white_beach, Type.BEACH);

View file

@ -60,10 +60,10 @@ public class GeneratorMangroveTree extends GeneratorTreeBase
this.altLeaves = null;
this.minHeight = 8;
this.maxHeight = 10;
this.minLeavesRadius = 1;
this.leavesGradient = 1;
this.minLeavesRadius = 4;
this.leavesGradient = 4;
this.vineAttempts = 20;
this.maxVineLength = 20;
this.maxVineLength = 2;
this.scatterYMethod = ScatterYMethod.AT_SURFACE;
}
@ -136,7 +136,7 @@ public class GeneratorMangroveTree extends GeneratorTreeBase
for (int y = rootHeight; y <= height; y++)
{
// require 1x1 for the trunk, 3x3 for the leaves
int radius = (y <= (rootHeight + middleHeight) ? 0 : 1);
int radius = (y <= (rootHeight + middleHeight) ? 1 : 2);
for (int x = -radius; x <= radius; x++)
{
for (int z = -radius; z <= radius; z++)
@ -215,7 +215,7 @@ public class GeneratorMangroveTree extends GeneratorTreeBase
int height = GeneratorUtils.nextIntBetween(random, this.minHeight, this.maxHeight);
int topHeight = Math.min(6, GeneratorUtils.nextIntBetween(random, height / 5, height / 3));
int rootHeight = Math.min(5, GeneratorUtils.nextIntBetween(random, height / 4, height / 2));
int rootHeight = Math.min(5, GeneratorUtils.nextIntBetween(random, height / 3, height / 2));
int middleHeight = height - topHeight - rootHeight;
if (middleHeight < 1) {return false;}
@ -262,7 +262,7 @@ public class GeneratorMangroveTree extends GeneratorTreeBase
EnumFacing sideways = direction.rotateY();
// choose a random starting point somewhere just outside the boundary of the tree
BlockPos pos = startPos.up(GeneratorUtils.nextIntBetween(rand, 2, height)).offset(direction, leavesRadius + 1).offset(sideways, GeneratorUtils.nextIntBetween(rand, -leavesRadius, leavesRadius));
BlockPos pos = startPos.up(GeneratorUtils.nextIntBetween(rand, 2, height)).offset(direction, leavesRadius).offset(sideways, GeneratorUtils.nextIntBetween(rand, -leavesRadius, leavesRadius));
// move back towards the center until we meet a leaf or log, then stick a vine on it
IBlockState state;

View file

@ -42,6 +42,10 @@ public class GenLayerBiomeEdgeBOP extends BOPGenLayer
// line BOP mountain peaks with BOP mountain foothills
if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BOPBiomes.mountain, BOPBiomes.mountain_foothills)) {continue;}
// line BOP alps peaks with BOP alps foothills
if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BOPBiomes.alps, BOPBiomes.alps_foothills)) {continue;}
// line BOP wasteland with vanilla desert
if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BOPBiomes.wasteland, Optional.of(Biomes.DESERT))) {continue;}