Hello people of the internet, I would like to know if there was a way to make a custom food item give you XP. I am in the middle of making a mod and would like "SimonApple" To give me XP. Please let me know if there is a way to do this.

```
package com.notsimon.blocksplus;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;

@Mod(modid = "ep", name = "Experience Plus", version = "1.0")
public class ExperiencePlus {

    public static Item SimonApple;
    public static Item MagentaDust;
    public static Block MagentaOre;
    public static Block MagentaBlock;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event) {
        //Item/Block init and registering
        //Config handling
        //X * 0.5 = 20 Hunger
        SimonApple = new ItemFood(10, 0.5F, false).setUnlocalizedName("SimonApple").setTextureName("bp:SimonApple").setCreativeTab(tabBlocksPlus);
        MagentaOre = new BlockTable(Material.iron).setBlockName("MagentaOre").setBlockTextureName("bp:MagentaOre").setCreativeTab(tabBlocksPlus);
        MagentaDust = new ItemTable().setUnlocalizedName("MagentaDust").setTextureName("bp:MagentaDust").setCreativeTab(tabBlocksPlus);
        MagentaBlock = new MagentaBlock(Material.iron).setBlockName("MagentaBlock").setBlockTextureName("bp:MagentaBlock").setCreativeTab(tabBlocksPlus);
        //item.itemTable and substring(5) removes "item."
        GameRegistry.registerItem(SimonApple, SimonApple.getUnlocalizedName().substring(5));
        GameRegistry.registerBlock(MagentaOre, MagentaOre.getUnlocalizedName().substring(5));
        GameRegistry.registerItem(MagentaDust, MagentaDust.getUnlocalizedName().substring(5));
        GameRegistry.registerBlock(MagentaBlock, MagentaBlock.getUnlocalizedName().substring(5));
        GameRegistry.registerWorldGenerator(new OreGeneration(), 0);
    }

    @EventHandler
    public void init(FMLInitializationEvent event) {
        //Proxy, TileEntity, entity, GUI and Packet Registering
        GameRegistry.addRecipe(new ItemStack(SimonApple, 2), new Object[]{"MMM","MBM","MMM", 'M', ExperiencePlus.MagentaDust, 'B', ExperiencePlus.MagentaBlock});
        GameRegistry.addRecipe(new ItemStack(MagentaBlock), new Object[] {"MMM", "MMM", "MMM",'M', ExperiencePlus.MagentaDust});
    }

    @EventHandler
    public void postInit(FMLPostInitializationEvent event) {

    }

    public static CreativeTabs tabBlocksPlus = new CreativeTabs("tabBlocksPlus"){
        @Override
        public Item getTabIconItem() {
            return new ItemStack(MagentaOre).getItem();
        }
    };

}

```