public void mouseClicked(int par1, int par2, int par3)
    {
        boolean flag = par1 >= xPos && par1 < xPos + width && par2 >= yPos && par2 < yPos + height;

        if (canLoseFocus)
        {
            setFocused(isEnabled && flag);
        }

        if (isFocused && par3 == 0)
        {
            int i = par1 - xPos;

            if (enableBackgroundDrawing)
            {
                i -= 4;
            }

            String s = fontRenderer.trimStringToWidth(text.substring(field_73816_n), getWidth());
            setCursorPosition(fontRenderer.trimStringToWidth(s, i).length() + field_73816_n);
        }
    }