The bug
When spam-clicking with the sword on the ground and run at the same time the character gets stuck.
This also happens when left clicking with the debug stick in Creative mode and when hitting blocks which can normally be broken instantaneously in Survival with a debug stick.
How to reproduce
Be in gamemode creative
Get a sword or a trident
Look at the ground and spamclick on the left mouse button
Try to run while you still spamclick with your sword/trident
Further notes by @unknown
This issue affects more than what is currently mentioned in here.
Any time the player (attemps to) break a block, but the block isn't broken server-side, the player gets teleported back to where they were when they broke that block.
This issue appears when running around while clicking the ground with a sword in creative mode I assume because the client is actually still sending 'block interaction packets' as they are technically still 'mining' the block. However, neither the client nor server break the block because the player is holding a sword.
This same issue can also be observed in survival mode when the server is lagging as the lag introduces 'block lag'. Block lag is when the player mines a block but the block re-appears due to not (yet) being broken server-side because of the lag. Before this issue was introduced the block re-appeared and that was that. Since this issue was introduced the player also gets teleported back as soon as the block re-appears. (Here's a video showing this on a vanilla singleplayer world where I caused excessive server lag for the purpose of demonstration.)
Also, while I know this isn't relevant for you guys, this issue also affects modded servers where the player isn't allowed to break certain blocks or blocks in certain areas. The block gets broken client-side, but then re-appears for the client in the next (server) tick, and since 1.14.4 (Pre-Release 4?) the player gets teleported back to the location they were at when they broke the block client-side. (Here's a video of that on a spigot 1.14.4 server with a plugin that offers such functionality.)
This is almost certainly caused by the fix for MC-156013, and MC-156852 might be in the same boat. What is the point of pre-releases anymore if changes introduced in them cause more issues than they solve and make it into the final releases for a version? Anyhow, my point is that fix implemented for MC-156013 is plain bad and I can't trust you guys to not fix this issue by doing something equally bad, like adding a check that doesn't teleport the player back if they're holding a sword.
With that said, a better fix for MC-156013 using the current method is probably to teleport the player back only if the player's hitbox intersects the re-appearing block. This would get rid of this issue as well.
Related issues
is duplicated by
relates to
Comments


Affect 19w34a

Can confirm for 19w35a.

Affects 19w36a

Can confirm for 19w37a.

Can confirm for 19w40a

Affects 19w41a

Affects 19w42a

Affects 19w44a

Affects 19w45a

affects 19w46a

Affects 1.15 Pre-1

Affects 1.15 Pre-2

Affects 1.15 Pre-3

Affects 1.15 Pre-4

A video showcasing this issue from my bug report: https://www.youtube.com/watch?v=6xJ1iJUBZNI

I'm not sure why this is marked as creative, but all three videos now linked under this issue shows that it happens in survival mode.
Please update, it's an annoying bug that happens all the time as soon as a server lags a little bit(and 1.14 smp servers do lag often)

Affects 1.15 Pre-5

Affects Release 1.15

Affects release 1.15.1

It happens with Debug Stick too

Affects 1.15.2 Pre-1

Affects 1.15.2 Pre-2

Affects release 1.15.2

Affects 20w06a

This bug is super annoying and i hope it gets fixed asap

Affects 20w08a

Affects 20w09a

Affects 20w11a

Affects 20w12a

Affects 20w13a

Affects 20w14a

Even works with the debug stick - which is unfortunately unsupported

Affects 20w15a

Affects 20w16a

Affects 20w17a

I think it is all items that when used don't allow things to be broken by it. If you using a sword in a good build you want to kill a zombie and ruin the build

Can confirm for 20w17a, both in creative using the trident/sword test, and when experiencing block lag in singleplayer worlds (which really shouldn't happen, but has started happening since the 1.16 snapshots).

Affects 20w18a

This actually only happens when you run and then spam-click. When doing it the other way round (ie spam-click then run), the player still glitches but can keep moving.

Affects 20w19a

Affects 20w20a
This also happens when holding left click while moving.

Note to TorandoChaser: block lag in single player has been a thing since 2012 when "single player" was changed to 1-person multiplayer (so that it wasn't 2 different programs for single player and multiplayer with 2 different lists of bugs). Turn your view distance up higher than you computer can handle and the first two symptoms are block lag and creatures freezing for a second or more partway through their animations.

Isn’t that just general server lag?

Cannot reproduce in 1.17.1 Release Candidate 2. facepalms

@ampolive That's cuz this was fixed in 20w22a. You're commenting on a bug that's already resolved.
This issue affects more than what is currently mentioned in here.
Any time the player (attemps to) break a block, but the block isn't broken server-side, the player gets teleported back to where they were when they broke that block.
This issue appears when running around while clicking the ground with a sword in creative mode I assume because the client is actually still sending 'block interaction packets' as they are technically still 'mining' the block. However, neither the client nor server break the block because the player is holding a sword.
This same issue can also be observed in survival mode when the server is lagging as the lag introduces 'block lag'. Block lag is when the player mines a block but the block re-appears due to not (yet) being broken server-side because of the lag. Before this issue was introduced the block re-appeared and that was that. Since this issue was introduced the player also gets teleported back as soon as the block re-appears. (Here's a video showing this on a vanilla singleplayer world where I caused excessive server lag for the purpose of demonstration.)
Also, while I know this isn't relevant for you guys, this issue also affects modded servers where the player isn't allowed to break certain blocks or blocks in certain areas. The block gets broken client-side, but then re-appears for the client in the next (server) tick, and since 1.14.4 (Pre-Release 4?) the player gets teleported back to the location they were at when they broke the block client-side. (Here's a video of that on a spigot 1.14.4 server with a plugin that offers such functionality.)
This is almost certainly caused by the fix for MC-156013, and MC-156852 might be in the same boat. What is the point of pre-releases anymore if changes introduced in them cause more issues than they solve and make it into the final releases for a version? Anyhow, my point is that fix implemented for MC-156013 is plain bad and I can't trust you guys to not fix this issue by doing something equally bad, like adding a check that doesn't teleport the player back if they're holding a sword.
With that said, a better fix for MC-156013 using the current method is probably to teleport the player back only if the player's hitbox intersects the re-appearing block. This would get rid of this issue as well.