Topic category: Help with MCreator software
Why is there no plaint item events at all? I need to change add a random event to add seeds when a crap is havist
if ((Math.random() * 100) <= 20) {
if (entity instanceof EntityPlayer)
((EntityPlayer) entity).inventory.addItemStackToInventory(new ItemStack(mcreator_soulSeeds.block, 1));
}
But there is no place to put it no events or anything and I tried adding it to the item code but clearly that was wrong
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
return new ItemStack(mcreator_babySouls.block).getItem();
}
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) { if ((Math.random() * 100) <= 20) {
if (entity instanceof EntityPlayer)
((EntityPlayer) entity).inventory.addItemStackToInventory(new ItemStack(mcreator_soulSeeds.block, 1));
}
return new ItemStack(mcreator_babySouls.block).getItem();
}
Not getting any errors but it does not drop the seeds at all
Also there is a strange bug with the Univrisal locations of crops and plants, they spawned all over and in the sky ...
Weird.
Yes I know its werid but that is not helpful and pushs a reply,please reply helpfully, ideas on how to fix it or ideas where the code should go.
One word replies tho give me fauls hope that someone can help me, hope you understand.
I have the same problem with plants spawning everywhere. i am going to mess around with them and see if I can change that, because I need to add in some into my mod.
@#2 Sry. I think a soulution would be to make the drop rate anything except 1. (That happens with mob spawn rates, so...)