public void onUpdate()
    {
        this.field_22062_y = 0.0F;
        super.onUpdate();
        this.field_705_Q = this.field_704_R;
        double var1 = this.posX - this.prevPosX;
        double var3 = this.posZ - this.prevPosZ;
        float var5 = MathHelper.sqrt_double(var1 * var1 + var3 * var3) * 4.0F;

        if (var5 > 1.0F)
        {
            var5 = 1.0F;
        }

        this.field_704_R += (var5 - this.field_704_R) * 0.4F;
        this.field_703_S += this.field_704_R;

        if (!this.isItemInUse && this.isEating() && this.inventory.mainInventory[this.inventory.currentItem] != null)
        {
            ItemStack var6 = this.inventory.mainInventory[this.inventory.currentItem];
            this.setItemInUse(this.inventory.mainInventory[this.inventory.currentItem], Item.itemsList[var6.itemID].getMaxItemUseDuration(var6));
            this.isItemInUse = true;
        }
        else if (this.isItemInUse && !this.isEating())
        {
            this.clearItemInUse();
            this.isItemInUse = false;
        }
    }