Affects Version/s: 1.16.5, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 2, 1.17 Pre-release 3, 1.17 Pre-release 4, 1.17 Pre-release 5, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 2, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1 Release Candidate 2, 1.17.1
Fix Version/s: None
Environment:Windows 10, Java 8 (1.8.0_281-b09)
If you hit an entity while swimming underwater, the player will stop swimming for a brief moment (it changes the size of its hitbox to the one it has when it is standing and returns to the swimming one) and then get stuck in the middle of the water if they try to swim below a block (the player gets stuck when their large hitbox collides with a block, even if they are using a different size hitbox).
Steps to Reproduce:
1. Go to an aquifer (flooded cave)
2. Underwater, spawn an entity:
3. Swim while holding W + Ctrl (don't release these keys)
4. Hit the entity (you will see that it stops swimming for a moment)
5. Try to reach the ceiling of the cave (you will get stuck a block away from the ceiling)
If you release these two keys, it will work normally again.
You can also reproduce this in third person with the hitboxes turned on (F3 + b), and you will see the quick hitbox change that it does when hitting the entity.
Watch Bug with hitboxes on.mp4 to understand this better.
The bug can also be triggered when exiting the water in certain circumstances (if there is one block of air between the roof and the water and a block next to where the player comes out) and can cause damage to the player when colliding with a block. (Damaged when exiting the water.mp4)