In the method, public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer), I'm trying to get it to return a random item. I've looked through the forums, BlockOre, BlockGravel, etc, but I can't figure out how to do that. I'm sure it's something easy, but I can't figure it out. Can anyone help?
If you read that last thing, ignore it. I misread your post lol
To do that, just run a random number and get it to return a new ItemStack with that item/block in it. A nice big if-elseif-else statement would be good, or a switch would also work (which would probably look nicer ).
-Muserae
Try this:If you read that last thing, ignore it. I misread your post lol
To do that, just run a random number and get it to return a new ItemStack with that item/block in it. A nice big if-elseif-else statement would be good, or a switch would also work (which would probably look nicer ).
The code for that would be