/// <summary> /// Notifies the server of things like consuming food, etc... /// </summary> public virtual bool SendUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack) { int i = par3ItemStack.StackSize; ItemStack itemstack = par3ItemStack.UseItemRightClick(par2World, par1EntityPlayer); if (itemstack != par3ItemStack || itemstack != null && itemstack.StackSize != i) { par1EntityPlayer.Inventory.MainInventory[par1EntityPlayer.Inventory.CurrentItem] = itemstack; if (itemstack.StackSize == 0) { par1EntityPlayer.Inventory.MainInventory[par1EntityPlayer.Inventory.CurrentItem] = null; } return(true); } else { return(false); } }