Merge branch 'BOP-1.8.9-3.0.x' of https://github.com/Glitchfiend/BiomesOPlenty into BOP-1.8.9-3.0.x

This commit is contained in:
Adubbz 2016-01-19 16:13:46 +11:00
commit bb2f5b99b1
3 changed files with 123 additions and 0 deletions

View file

@ -64,6 +64,7 @@ public class BOPBiomes
public static Optional<BiomeGenBase> steppe = Optional.absent();
public static Optional<BiomeGenBase> thicket = Optional.absent();
public static Optional<BiomeGenBase> tundra = Optional.absent();
public static Optional<BiomeGenBase> wasteland = Optional.absent();
public static Optional<BiomeGenBase> wetland = Optional.absent();
public static Optional<BiomeGenBase> woodland = Optional.absent();
public static Optional<BiomeGenBase> xeric_shrubland = Optional.absent();

View file

@ -0,0 +1,118 @@
/*******************************************************************************
* 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.BlockTallGrass;
import net.minecraft.block.state.IBlockState;
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.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.enums.BOPClimates;
import biomesoplenty.common.enums.BOPGems;
import biomesoplenty.common.enums.BOPPlants;
import biomesoplenty.common.enums.BOPTrees;
import biomesoplenty.common.enums.BOPWoods;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.util.block.BlockQuery.IBlockPosQuery;
import biomesoplenty.common.world.BOPWorldSettings;
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.GeneratorSplatter;
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
import biomesoplenty.common.world.feature.tree.GeneratorBigTree;
import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree;
public class BiomeGenWasteland extends BOPBiome
{
public BiomeGenWasteland()
{
// terrain
this.terrainSettings.avgHeight(64).heightVariation(5, 5);
this.setColor(0x5A5440);
this.setTemperatureRainfall(0.9F, 0.05F);
this.topBlock = BOPBlocks.dried_dirt.getDefaultState();
this.fillerBlock = BOPBlocks.dried_dirt.getDefaultState();
this.waterColorMultiplier = 0xE5FF00;
this.skyColor = 0x909E70;
this.setDisableRain();
this.seaFloorBlock = BOPBlocks.dried_dirt.getDefaultState();
this.canGenerateRivers = false;
this.canGenerateVillages = false;
this.addWeight(BOPClimates.HOT_DESERT, 2);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
IBlockPosQuery emptyDriedDirt = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create();
// trees
GeneratorWeighted treeGenerator = new GeneratorWeighted(1);
treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).minHeight(5).maxHeight(12).placeOn(emptyDriedDirt).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).create());
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(0.2F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("dead_bushes", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.DEAD_BUSH).create());
// other plants
this.addGenerator("dead_grass", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.DEADGRASS).create());
// lakes
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).waterLakeForBiome(this).create());
this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).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)
{
return 0x9DA078;
}
@Override
public int getFoliageColorAtPos(BlockPos pos)
{
return 0x999E55;
}
// TODO: These 2 are copied from 1.7 - but are they used ever?
public int getFogColour(BlockPos pos)
{
return 0xB8BC85;
}
public float getFogDensity(BlockPos pos)
{
return 0.3F;
}
}

View file

@ -70,6 +70,7 @@ import static biomesoplenty.api.biome.BOPBiomes.swampland_extension;
import static biomesoplenty.api.biome.BOPBiomes.taiga_extension;
import static biomesoplenty.api.biome.BOPBiomes.thicket;
import static biomesoplenty.api.biome.BOPBiomes.tundra;
import static biomesoplenty.api.biome.BOPBiomes.wasteland;
import static biomesoplenty.api.biome.BOPBiomes.wetland;
import static biomesoplenty.api.biome.BOPBiomes.woodland;
import static biomesoplenty.api.biome.BOPBiomes.xeric_shrubland;
@ -137,6 +138,7 @@ import biomesoplenty.common.biome.overworld.BiomeGenSnowyConiferousForest;
import biomesoplenty.common.biome.overworld.BiomeGenSteppe;
import biomesoplenty.common.biome.overworld.BiomeGenThicket;
import biomesoplenty.common.biome.overworld.BiomeGenTundra;
import biomesoplenty.common.biome.overworld.BiomeGenWasteland;
import biomesoplenty.common.biome.overworld.BiomeGenWetland;
import biomesoplenty.common.biome.overworld.BiomeGenWoodland;
import biomesoplenty.common.biome.overworld.BiomeGenXericShrubland;
@ -358,6 +360,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
thicket = registerBOPBiome(new BiomeGenThicket(), "Thicket");
tundra = registerBOPBiome(new BiomeGenTundra(), "Tundra");
wetland = registerBOPBiome(new BiomeGenWetland(), "Wetland");
wasteland = registerBOPBiome(new BiomeGenWasteland(), "Wasteland");
woodland = registerBOPBiome(new BiomeGenWoodland(), "Woodland");
xeric_shrubland = registerBOPBiome(new BiomeGenXericShrubland(), "Xeric Shrubland");
@ -422,6 +425,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
registerBiomeToDictionary(BOPBiomes.steppe, Type.PLAINS, Type.SANDY, Type.DRY, Type.HOT, Type.SAVANNA, Type.SPARSE, Type.DEAD);
registerBiomeToDictionary(BOPBiomes.thicket, Type.PLAINS, Type.FOREST, Type.DRY, Type.DEAD, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.tundra, Type.COLD, Type.WASTELAND, Type.DRY, Type.DEAD, Type.SPARSE);
registerBiomeToDictionary(BOPBiomes.wasteland, Type.WASTELAND, Type.DEAD, Type.SPARSE, Type.DRY);
registerBiomeToDictionary(BOPBiomes.wetland, Type.SWAMP, Type.FOREST, Type.WET, Type.LUSH);
registerBiomeToDictionary(BOPBiomes.woodland, Type.FOREST, Type.DRY, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.xeric_shrubland, Type.PLAINS, Type.SPARSE, Type.DRY);