Yes, but you must create new class for your food (well maybe there is simplier way, but I don't know about it) similar to ItemFood. You would need to change a few things to make it work. As far as I remember you have to edit this line (in onFoodEaten method)
*** is how much food is restored and XXX is saturation modifier. You can't use variables that are in ItemFood, but constants, that is why you need to create separate class for every food you want (Or you can change the main method but that is more advanced)
And then edit method called onItemRightClick
You want it to look like this:
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
par3EntityPlayer.getFoodStats().addStats(***, XXX);
*** is how much food is restored and XXX is saturation modifier. You can't use variables that are in ItemFood, but constants, that is why you need to create separate class for every food you want (Or you can change the main method but that is more advanced)
And then edit method called onItemRightClick
You want it to look like this:
Hope it helps a bit
Divine smoker mod - Hookah in Minecraft: http://www.minecraftforum.net/topic/1689980-172splanspdivine-smoker-water-pipe-modhookahshisha-11/
You can also use setAlwaysEdible()
example:
new ItemFood(1,1.0f, false).setAlwaysEdible();