Re-added Tropical Rainforest biome, tweaked mob spawns in certain biomes

This commit is contained in:
Matt Caughey 2016-01-21 13:27:42 -05:00
parent f2d8c0ca97
commit 7d6feaba55
13 changed files with 144 additions and 11 deletions

View File

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

View File

@ -35,6 +35,8 @@ public class BiomeGenAlps extends BOPBiome
this.topBlock = Blocks.snow.getDefaultState();
this.fillerBlock = Blocks.snow.getDefaultState();
this.spawnableCreatureList.clear();
// gem
this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.emerald_ore.getDefaultState()).create());

View File

@ -62,6 +62,7 @@ public class BiomeGenBambooForest extends BOPBiome
this.addWeight(BOPClimates.TROPICAL, 3);
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
this.topBlock = Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL);

View File

@ -57,7 +57,6 @@ public class BiomeGenBog extends BOPBiome
this.addWeight(BOPClimates.COLD_SWAMP, 7);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));

View File

@ -40,8 +40,7 @@ public class BiomeGenChaparral extends BOPBiome
this.setTemperatureRainfall(0.8F, 0.6F);
this.addWeight(BOPClimates.MEDITERANEAN, 10);
this.spawnableCreatureList.clear(); // none of your regular farmyard critters here
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
// stone patches

View File

@ -29,7 +29,7 @@ public class BiomeGenDeciduousForest extends BOPBiome
this.setColor(0xC1B749);
this.setTemperatureRainfall(0.6F, 0.8F);
this.addWeight(BOPClimates.WARM_TEMPERATE, 10);
this.addWeight(BOPClimates.COOL_TEMPERATE, 7);
this.canGenerateVillages = false;

View File

@ -52,7 +52,6 @@ public class BiomeGenHeathland extends BOPBiome
this.addWeight(BOPClimates.MEDITERANEAN, 10);
this.addWeight(BOPClimates.DRY_TEMPERATE, 5);
this.spawnableCreatureList.clear(); // none of your regular farmyard critters here
// TODO: why is there SO many horses?
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));

View File

@ -62,9 +62,7 @@ public class BiomeGenLandOfLakes extends BOPBiome
this.addWeight(BOPClimates.WET_TEMPERATE, 3);
this.addWeight(BOPClimates.COOL_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));
this.spawnableWaterCreatureList.clear();
// gravel
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create());

View File

@ -52,8 +52,6 @@ public class BiomeGenLushDesert extends BOPBiome
this.addWeight(BOPClimates.HOT_DESERT, 5);
this.spawnableCreatureList.clear();
// trees
IBlockPosQuery emptyHardenedClay = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create();
GeneratorWeighted treeGenerator = new GeneratorWeighted(3);

View File

@ -47,7 +47,6 @@ public class BiomeGenMoor extends BOPBiome
this.addWeight(BOPClimates.COLD_SWAMP, 7);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
// mud

View File

@ -52,6 +52,7 @@ public class BiomeGenQuagmire extends BOPBiome
this.addWeight(BOPClimates.COLD_SWAMP, 2);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));

View File

@ -0,0 +1,132 @@
package biomesoplenty.common.biome.overworld;
import net.minecraft.block.BlockDoublePlant;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
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.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPSand;
import biomesoplenty.common.enums.BOPClimates;
import biomesoplenty.common.enums.BOPFlowers;
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.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.GeneratorOreSingle;
import biomesoplenty.common.world.feature.GeneratorSplotches;
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
public class BiomeGenTropicalRainforest extends BOPBiome
{
public BiomeGenTropicalRainforest()
{
// terrain
this.terrainSettings.avgHeight(67).heightVariation(10, 25);
this.setColor(0x88E140);
this.setTemperatureRainfall(1.2F, 1.0F);
this.skyColor = 0xC8CC5F;
this.waterColorMultiplier = 0x5DFF00;
this.canGenerateVillages = false;
this.addWeight(BOPClimates.TROPICAL, 7);
this.spawnableCreatureList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
// quicksand
this.addGenerator("quicksand_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(0.6F).splotchSize(16).with(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).splotchSize(20).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
// trees
GeneratorWeighted treeGenerator = new GeneratorWeighted(15.0F);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("mahogany", 6, (new GeneratorBasicTree.Builder()).log(BOPWoods.MAHOGANY).leaves(BOPTrees.MAHOGANY).minLeavesRadius(2).minHeight(10).maxHeight(15).create());
treeGenerator.add("jungle", 2, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).minHeight(8).maxHeight(12).vine(Blocks.vine.getDefaultState()).create());
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(1.5F);
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
flowerGenerator.add("orange_cosmos", 4, (new GeneratorFlora.Builder().with(BOPFlowers.ORANGE_COSMOS).create()));
// other plants
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SHRUB).create());
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.LEAFPILE).generationAttempts(64).create());
this.addGenerator("poison_ivy", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.POISONIVY).create());
this.addGenerator("double_fern", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.2F).with(BlockDoublePlant.EnumPlantType.FERN).create());
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.SPROUT).create());
// shrooms
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create());
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create());
// water plants
this.addGenerator("duckweed", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BlockBOPLilypad.LilypadType.DUCKWEED).generationAttempts(32).create());
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).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.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(10.0F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("tallgrass", 5, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).generationAttempts(128).create());
grassGenerator.add("mediumgrass", 5, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).generationAttempts(128).create());
grassGenerator.add("wheatgrass", 5, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).generationAttempts(128).create());
grassGenerator.add("dampgrass", 5, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).generationAttempts(128).create());
grassGenerator.add("fern", 3, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
// gem
this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create());
}
@Override
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
}
@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 ? 11002176 : 12836929;
}
@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 ? 8970560 : 10870849;
}
// TODO: These 2 are copied from 1.7 - but are they used ever?
public int getFogColour(BlockPos pos)
{
return 0x4AD670;
}
public float getFogDensity(BlockPos pos)
{
return 0.145F;
}
}

View File

@ -77,6 +77,7 @@ import static biomesoplenty.api.biome.BOPBiomes.swampland_extension;
import static biomesoplenty.api.biome.BOPBiomes.taiga_extension;
import static biomesoplenty.api.biome.BOPBiomes.temperate_rainforest;
import static biomesoplenty.api.biome.BOPBiomes.thicket;
import static biomesoplenty.api.biome.BOPBiomes.tropical_rainforest;
import static biomesoplenty.api.biome.BOPBiomes.tundra;
import static biomesoplenty.api.biome.BOPBiomes.wasteland;
import static biomesoplenty.api.biome.BOPBiomes.wetland;
@ -153,6 +154,7 @@ import biomesoplenty.common.biome.overworld.BiomeGenSnowyConiferousForest;
import biomesoplenty.common.biome.overworld.BiomeGenSteppe;
import biomesoplenty.common.biome.overworld.BiomeGenTemperateRainforest;
import biomesoplenty.common.biome.overworld.BiomeGenThicket;
import biomesoplenty.common.biome.overworld.BiomeGenTropicalRainforest;
import biomesoplenty.common.biome.overworld.BiomeGenTundra;
import biomesoplenty.common.biome.overworld.BiomeGenWasteland;
import biomesoplenty.common.biome.overworld.BiomeGenWetland;
@ -382,6 +384,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
steppe = registerBOPBiome(new BiomeGenSteppe(), "Steppe");
temperate_rainforest = registerBOPBiome(new BiomeGenTemperateRainforest(), "Temperate Rainforest");
thicket = registerBOPBiome(new BiomeGenThicket(), "Thicket");
tropical_rainforest = registerBOPBiome(new BiomeGenTropicalRainforest(), "Tropical Rainforest");
tundra = registerBOPBiome(new BiomeGenTundra(), "Tundra");
wetland = registerBOPBiome(new BiomeGenWetland(), "Wetland");
wasteland = registerBOPBiome(new BiomeGenWasteland(), "Wasteland");
@ -457,6 +460,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.temperate_rainforest, Type.FOREST, Type.WET, Type.DENSE, Type.LUSH);
registerBiomeToDictionary(BOPBiomes.thicket, Type.PLAINS, Type.FOREST, Type.DRY, Type.DEAD, Type.DENSE);
registerBiomeToDictionary(BOPBiomes.tropical_rainforest, Type.JUNGLE, Type.LUSH, Type.HOT, Type.WET);
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);