I'm having the same problem except in singleplayer I locked the difficulty at peaceful and when I switched to survival from creative I couldn't break blocks!!! It did the same thing in another single player world!!!! I have optifine installed and was using it and nothing else!!!