Are there any up to date tutorials for adding new seed drops to wild grass to plant and grow new crop types (like tomatoes, potatoes, etc)? If not, would anyone be so kind as to write one? I'm not sure how it would work with Modloader. =(
Where it states the object dropped in BlockTallGrass.java add int a = random.nextInt(100);
Basically it chooses a random number between 1 and 100
Then chooes your seeds drop rate. This gives Seeds a 1/10 chance and Your seed a 1/50 chance. public int idDropped(int i, Random random)
{
int a = random.nextInt(100);
if(a < 10)
{
return Item.seeds.shiftedIndex;
} if(a == 50)
{
return mod_MyItem.Myseed.shiftedIndex;
}
else
{
return -1;
}
}
How do I modify the TallGrass.class file through Modloader, so it will drop other seeds besides wheat?
How I use Modloader to make need seed items grow new types of plants?
I've already successfully added items and new blocks to Minecraft with Modloader, so I'm not a complete newb. Just confused.
Where it states the object dropped in BlockTallGrass.java add
int a = random.nextInt(100);
Basically it chooses a random number between 1 and 100
Then chooes your seeds drop rate. This gives Seeds a 1/10 chance and Your seed a 1/50 chance.
public int idDropped(int i, Random random)
{
int a = random.nextInt(100);
if(a < 10)
{
return Item.seeds.shiftedIndex;
} if(a == 50)
{
return mod_MyItem.Myseed.shiftedIndex;
}
else
{
return -1;
}
}