/******************************************************************************* * AbyssalCraft * Copyright (c) 2012 - 2017 Shinoow. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v3 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl-3.0.txt * * Contributors: * Shinoow - implementation ******************************************************************************/ package com.shinoow.abyssalcraft.common.items; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import com.shinoow.abyssalcraft.api.item.ACItems; import com.shinoow.abyssalcraft.lib.ACTabs; public class ItemPlatefood extends ItemFood { public ItemPlatefood(int j, float f, boolean b, String name) { super(j, f, b); setUnlocalizedName(name); setCreativeTab(ACTabs.tabFood); setMaxStackSize(4); } @Override public void onFoodEaten(ItemStack itemStack, World world, EntityPlayer entityPlayer) { entityPlayer.inventory.addItemStackToInventory(new ItemStack(ACItems.dirty_plate)); } }