hey guys. I'm making an awesome mod, but i need help with Flower generation.
I will give credits for it if you help me and it works.
Here the original code.
Please type the whole code.
Try give an example of a flower called: Flowie
The Block id haves to be 151(if that helps)
If you help i will say thank you VERY VERY MUCH!
[oh btw. if haves to be a rare flower if you know, how to code that]
I will give credits for it if you help me and it works.
Here the original code.
Click to reveal
package net.minecraft.src;
import java.util.Random;
public class WorldGenFlowers extends WorldGenerator
{
/** The ID of the plant block used in this plant generator. */
private int plantBlockId;
public WorldGenFlowers(int par1)
{
plantBlockId = par1;
}
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
for (int i = 0; i < 64; i++)
{
int j = (par3 + par2Random.nextInt(8)) - par2Random.nextInt(8);
int k = (par4 + par2Random.nextInt(4)) - par2Random.nextInt(4);
int l = (par5 + par2Random.nextInt(8)) - par2Random.nextInt(8);
if (par1World.isAirBlock(j, k, l) && ((BlockFlower)Block.blocksList[plantBlockId]).canBlockStay(par1World, j, k, l))
{
par1World.setBlock(j, k, l, plantBlockId);
}
}
return true;
}
}
import java.util.Random;
public class WorldGenFlowers extends WorldGenerator
{
/** The ID of the plant block used in this plant generator. */
private int plantBlockId;
public WorldGenFlowers(int par1)
{
plantBlockId = par1;
}
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
for (int i = 0; i < 64; i++)
{
int j = (par3 + par2Random.nextInt(8)) - par2Random.nextInt(8);
int k = (par4 + par2Random.nextInt(4)) - par2Random.nextInt(4);
int l = (par5 + par2Random.nextInt(8)) - par2Random.nextInt(8);
if (par1World.isAirBlock(j, k, l) && ((BlockFlower)Block.blocksList[plantBlockId]).canBlockStay(par1World, j, k, l))
{
par1World.setBlock(j, k, l, plantBlockId);
}
}
return true;
}
}
Please type the whole code.
Try give an example of a flower called: Flowie
The Block id haves to be 151(if that helps)
If you help i will say thank you VERY VERY MUCH!
[oh btw. if haves to be a rare flower if you know, how to code that]
Create an account or sign in to comment.