Re-added Land of Lakes biome
This commit is contained in:
parent
aea5fa5918
commit
32457bed32
4 changed files with 137 additions and 1 deletions
|
@ -47,6 +47,7 @@ public class BOPBiomes
|
|||
public static Optional<BiomeGenBase> heathland = Optional.absent();
|
||||
public static Optional<BiomeGenBase> highland = Optional.absent();
|
||||
public static Optional<BiomeGenBase> jade_cliffs = Optional.absent();
|
||||
public static Optional<BiomeGenBase> land_of_lakes = Optional.absent();
|
||||
public static Optional<BiomeGenBase> lavender_fields = Optional.absent();
|
||||
public static Optional<BiomeGenBase> lush_desert = Optional.absent();
|
||||
public static Optional<BiomeGenBase> maple_woods = Optional.absent();
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
/*******************************************************************************
|
||||
* 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 net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import biomesoplenty.api.biome.BOPBiome;
|
||||
import biomesoplenty.api.biome.generation.GeneratorStage;
|
||||
import biomesoplenty.api.biome.generation.GeneratorWeighted;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.block.BlockBOPLilypad;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.enums.BOPClimates;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.BOPWorldSettings;
|
||||
import biomesoplenty.common.world.feature.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.feature.GeneratorFlora;
|
||||
import biomesoplenty.common.world.feature.GeneratorGrass;
|
||||
import biomesoplenty.common.world.feature.GeneratorLakes;
|
||||
import biomesoplenty.common.world.feature.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.feature.GeneratorSplotches;
|
||||
import biomesoplenty.common.world.feature.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorBush;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree;
|
||||
|
||||
public class BiomeGenLandOfLakes extends BOPBiome
|
||||
{
|
||||
|
||||
// TODO: fog color / closeness? what's that?
|
||||
// TODO: should there be foliage colors / water colors?
|
||||
|
||||
public BiomeGenLandOfLakes()
|
||||
{
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(63).heightVariation(10, 10).octaves(5, 5, 0, 0, 1, 1).sidewaysNoise(0.1D);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
|
||||
this.seaFloorBlock = BOPBlocks.mud.getDefaultState();
|
||||
this.setColor(0x66A06E);
|
||||
this.setTemperatureRainfall(0.5F, 0.9F);
|
||||
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.addWeight(BOPClimates.WET_TEMPERATE, 3);
|
||||
|
||||
this.spawnableCreatureList.clear(); // none of your regular farmyard critters here
|
||||
this.spawnableWaterCreatureList.clear();
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
||||
|
||||
// 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(8).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());
|
||||
|
||||
// lakes
|
||||
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.0F).waterLakeForBiome(this).create());
|
||||
|
||||
// trees & logs
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(40);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("oak", 5, (new GeneratorBasicTree.Builder()).create());
|
||||
treeGenerator.add("birch", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).create());
|
||||
treeGenerator.add("spruce", 3, (new GeneratorTaigaTree.Builder()).maxHeight(13).create()); // TODO: implement pine cones
|
||||
|
||||
// other plants
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.DEADLEAFPILE).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.LEAFPILE).generationAttempts(64).create());
|
||||
this.addGenerator("wild_rice", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.WILDRICE).generationAttempts(64).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("duckweed", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BlockBOPLilypad.LilypadType.DUCKWEED).create());
|
||||
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.waterlily.getDefaultState()).create());
|
||||
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
|
||||
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.SMALL).create());
|
||||
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).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(1.0F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(10.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("wheatgrass", 5, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 5, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 5, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(BOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.func_151601_a((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.1D ? 13414508 : 13419628;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.func_151601_a((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.1D ? 12766316 : 10730594;
|
||||
}
|
||||
|
||||
}
|
|
@ -44,7 +44,7 @@ public class BiomeGenXericShrubland extends BOPBiome
|
|||
|
||||
this.canSpawnInBiome = false;
|
||||
|
||||
this.addWeight(BOPClimates.HOT_DESERT, 3);
|
||||
this.addWeight(BOPClimates.HOT_DESERT, 2);
|
||||
this.addWeight(BOPClimates.SAVANNA, 1);
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
|
|
|
@ -46,6 +46,7 @@ import static biomesoplenty.api.biome.BOPBiomes.highland;
|
|||
import static biomesoplenty.api.biome.BOPBiomes.ice_plains_extension;
|
||||
import static biomesoplenty.api.biome.BOPBiomes.jade_cliffs;
|
||||
import static biomesoplenty.api.biome.BOPBiomes.jungle_extension;
|
||||
import static biomesoplenty.api.biome.BOPBiomes.land_of_lakes;
|
||||
import static biomesoplenty.api.biome.BOPBiomes.lavender_fields;
|
||||
import static biomesoplenty.api.biome.BOPBiomes.lush_desert;
|
||||
import static biomesoplenty.api.biome.BOPBiomes.maple_woods;
|
||||
|
@ -125,6 +126,7 @@ import biomesoplenty.common.biome.overworld.BiomeGenGrove;
|
|||
import biomesoplenty.common.biome.overworld.BiomeGenHeathland;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenHighland;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenJadeCliffs;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenLandOfLakes;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenLavenderFields;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenLushDesert;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenMapleWoods;
|
||||
|
@ -350,6 +352,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
|
|||
heathland = registerBOPBiome(new BiomeGenHeathland(), "Heathland");
|
||||
highland = registerBOPBiome(new BiomeGenHighland(), "Highland");
|
||||
jade_cliffs = registerBOPBiome(new BiomeGenJadeCliffs(), "Jade Cliffs");
|
||||
land_of_lakes = registerBOPBiome(new BiomeGenLandOfLakes(), "Land Of Lakes");
|
||||
lavender_fields = registerBOPBiome(new BiomeGenLavenderFields(), "Lavender Fields");
|
||||
lush_desert = registerBOPBiome(new BiomeGenLushDesert(), "Lush Desert");
|
||||
maple_woods = registerBOPBiome(new BiomeGenMapleWoods(), "Maple Woods");
|
||||
|
@ -421,6 +424,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
|
|||
registerBiomeToDictionary(BOPBiomes.heathland, Type.PLAINS, Type.DRY, Type.SAVANNA);
|
||||
registerBiomeToDictionary(BOPBiomes.highland, Type.HILLS, Type.MOUNTAIN, Type.SPARSE);
|
||||
registerBiomeToDictionary(BOPBiomes.jade_cliffs, Type.FOREST, Type.MOUNTAIN, Type.DENSE);
|
||||
registerBiomeToDictionary(BOPBiomes.land_of_lakes, Type.FOREST, Type.DENSE, Type.WATER, Type.LUSH, Type.SWAMP);
|
||||
registerBiomeToDictionary(BOPBiomes.lavender_fields, Type.MAGICAL, Type.PLAINS, Type.LUSH, Type.SPARSE);
|
||||
registerBiomeToDictionary(BOPBiomes.lush_desert, Type.HOT, Type.DRY, Type.LUSH, Type.SANDY);
|
||||
registerBiomeToDictionary(BOPBiomes.maple_woods, Type.FOREST, Type.DENSE, Type.CONIFEROUS, Type.COLD);
|
||||
|
|
Loading…
Reference in a new issue