Added lilyflower generation.

This commit is contained in:
Matt Caughey 2013-05-15 08:49:06 -04:00
parent 6895a0c42a
commit d4f4e24a22
13 changed files with 72 additions and 1 deletions

18
mcmod.info Normal file
View file

@ -0,0 +1,18 @@
[{
"modid": "BiomesOPlenty",
"name": "Biomes O' Plenty",
"description": "Adds 72 new, unique biomes!",
"version": "0.5.3",
"mcversion": "1.5.2",
"url": "www.minecraftforum.net/topic/1495041-",
"updateUrl": "",
"authors": [ "TDWP_FTW", "ted80", "Adubbz", "Amnet" ],
"credits": "gamax92, enchilado, Tim Rurkowski",
"logoFile": "/bop.png",
"screenshots": [],
"parent": "",
"requiredMods": [],
"dependencies": [],
"dependants": [],
"useDependencyInformation": "false"
}]

View file

@ -41,6 +41,7 @@ import biomesoplenty.worldgen.WorldGenDriedDirt;
import biomesoplenty.worldgen.WorldGenGravel;
import biomesoplenty.worldgen.WorldGenHighGrass;
import biomesoplenty.worldgen.WorldGenHighCattail;
import biomesoplenty.worldgen.WorldGenLilyflower;
import biomesoplenty.worldgen.WorldGenMelon;
import biomesoplenty.worldgen.WorldGenMesa;
import biomesoplenty.worldgen.WorldGenMud;
@ -210,11 +211,13 @@ public class BiomeDecoratorBOP extends BiomeDecorator
/** The water lily generation! */
protected WorldGenerator waterlilyGen;
protected WorldGenerator lilyflowerGen;
protected WorldGenerator algaeGen;
protected WorldGenerator pitGen;
/** Amount of waterlilys per chunk. */
protected int waterlilyPerChunk;
protected int lilyflowersPerChunk;
protected int algaePerChunk;
protected int crystalsPerChunk;
protected int crystals2PerChunk;
@ -389,6 +392,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
this.bushGen = new WorldGenBush(Blocks.foliage.get().blockID, 4);
this.tinyCactusGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 11);
this.aloeGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 12);
this.lilyflowerGen = new WorldGenLilyflower();
this.deathbloomGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 2);
this.hydrangeaGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 4);
this.violetGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 8);
@ -426,6 +430,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
this.algaeGen = new WorldGenAlgae();
this.pitGen = new WorldGenPit(Blocks.ash.get().blockID);
this.waterlilyPerChunk = 0;
this.lilyflowersPerChunk = 0;
this.treesPerChunk = 0;
this.flowersPerChunk = 2;
this.grassPerChunk = 1;
@ -1243,6 +1248,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator
var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.desertCactusGen.generate(this.currentWorld, this.randomGenerator, var3, var4, var5);
}
for (var2 = 0; var2 < this.lilyflowersPerChunk; ++var2)
{
var3 = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
var4 = this.randomGenerator.nextInt(128);
var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
this.lilyflowerGen.generate(this.currentWorld, this.randomGenerator, var3, var4, var5);
}
if (this.generateLakes)
{

View file

@ -23,6 +23,7 @@ public class BiomeGenCherryBlossomGrove extends BiomeGenBase
this.customBiomeDecorator.whiteFlowersPerChunk = 30;
this.customBiomeDecorator.tinyFlowersPerChunk = 25;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.lilyflowersPerChunk = 6;
this.customBiomeDecorator.generatePumpkins = false;
}

View file

@ -44,6 +44,7 @@ public class BiomeGenFungiForest extends BiomeGenBase
this.customBiomeDecorator.cattailsPerChunk = 1;
this.customBiomeDecorator.highCattailsPerChunk = 2;
this.customBiomeDecorator.reedsBOPPerChunk = 1;
this.customBiomeDecorator.lilyflowersPerChunk = 2;
this.customBiomeDecorator.generateMycelium = true;
this.customBiomeDecorator.generatePumpkins = true;
this.waterColorMultiplier = 65326;

View file

@ -38,6 +38,7 @@ public class BiomeGenGarden extends BiomeGenBase
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.bushesPerChunk = 10;
this.customBiomeDecorator.lilyflowersPerChunk = 4;
this.customBiomeDecorator.generatePumpkins = true;
this.customBiomeDecorator.generateMelons = true;
this.spawnableCreatureList.clear();

View file

@ -20,6 +20,7 @@ public class BiomeGenGrove extends BiomeGenBase
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.sproutsPerChunk = 2;
this.customBiomeDecorator.poisonIvyPerChunk = 2;
this.customBiomeDecorator.lilyflowersPerChunk = 3;
this.customBiomeDecorator.generatePumpkins = false;
}

View file

@ -36,6 +36,7 @@ public class BiomeGenMysticGrove extends BiomeGenBase
this.customBiomeDecorator.hydrangeasPerChunk = 3;
this.customBiomeDecorator.blueMilksPerChunk = 4;
this.customBiomeDecorator.glowshroomsPerChunk = 2;
this.customBiomeDecorator.lilyflowersPerChunk = 3;
this.waterColorMultiplier = 15349914;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();

View file

@ -23,6 +23,7 @@ public class BiomeGenOrchard extends BiomeGenBase
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.portobellosPerChunk = 2;
this.customBiomeDecorator.sunflowersPerChunk = 1;
this.customBiomeDecorator.lilyflowersPerChunk = 2;
}
/**

View file

@ -38,6 +38,7 @@ public class BiomeGenSwampwoods extends BiomeGenBase
this.customBiomeDecorator.waterlilyPerChunk = 4;
this.customBiomeDecorator.reedsBOPPerChunk = 8;
this.customBiomeDecorator.blueMilksPerChunk = 1;
this.customBiomeDecorator.lilyflowersPerChunk = 2;
this.customBiomeDecorator.generatePumpkins = false;
}

View file

@ -37,6 +37,7 @@ public class BiomeGenTropicalRainforest extends BiomeGenBase
this.customBiomeDecorator.sproutsPerChunk = 2;
this.customBiomeDecorator.quicksandPerChunk = 3;
this.customBiomeDecorator.poisonIvyPerChunk = 4;
this.customBiomeDecorator.lilyflowersPerChunk = 2;
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
this.waterColorMultiplier = 6160128;
}

View file

@ -35,7 +35,8 @@ public class BiomeGenWetland extends BiomeGenBase
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.mudPerChunk = 5;
this.customBiomeDecorator.mudPerChunk2 = 5;
this.customBiomeDecorator.waterlilyPerChunk = 6;
this.customBiomeDecorator.waterlilyPerChunk = 4;
this.customBiomeDecorator.lilyflowersPerChunk = 4;
this.customBiomeDecorator.cattailsPerChunk = 20;
this.customBiomeDecorator.highCattailsPerChunk = 10;
this.customBiomeDecorator.blueFlowersPerChunk = 6;

View file

@ -0,0 +1,31 @@
package biomesoplenty.worldgen;
import java.util.Random;
import biomesoplenty.api.Blocks;
import biomesoplenty.configuration.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenLilyflower extends WorldGenerator
{
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
for (int l = 0; l < 10; ++l)
{
int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8);
int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4);
int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8);
if (par1World.isAirBlock(i1, j1, k1) && Block.waterlily.canPlaceBlockAt(par1World, i1, j1, k1))
{
par1World.setBlock(i1, j1, k1, Block.waterlily.blockID, 0, 2);
par1World.setBlock(i1, j1 + 1, k1, Blocks.flowers.get().blockID, 10, 2);
}
}
return true;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 291 B