I wish I knew what was causing this, but for the last couple of days, when I play both in my own solo world and in a world hosted by a friend, moving the mouse and trying to click on things with it becomes so laggy as to be unplayable. If it wasn't sporadic, it truly would be unplayable, but it seems to come and go. But for some reason, sometimes, just trying to move the mouse is extremely unresponsive, and clicking on things frequently doesn't register the clicks at all., both left clicking and right clicking. Or sometimes I'll click on a chest or an icebox or something like that, and then my character will repeatedly, rapidly open and close it without any further input from me, and despite my efforts to make them stop. Or they'll keep tilling the same spot on a farm with the hoe even though I only clicked once. Sometimes they'll just walk endlessly toward the cursor even when I haven't clicked on anything. And then it stops on its own and will be fine for several minutes at a time before starting again.
Keyboard inputs had no lag whatsoever and behaved correctly.
Notably, it was only noticeable on the surface--in caves, I didn't notice the problem, but then it returned when I went back to the surface again.
I'm not using any mods, and I replaced the batteries in my wireless mouse, and I restarted Steam and my whole computer, and it's still happening. I've played over 1,000 hours of the game prior to this, using the same computer and mouse the whole time, so I don't think it could be a hardware issue. Perhaps some update in the last week or so changed something, though I don't know what it could be.
I'm sorry I can't provide any more information, nothing seems to trigger it, it just happens, and it's very frustrating.
I truly wish I knew. It just happens, though only on the surface as far as I noticed.