The bug
If the player is blocking when they change dimension via nether or end portal, they will continue to block attacks on the server side but will not be blocking client side.
How to reproduce
Give the player a shield, and block with it:
/give @s shield[minecraft:unbreakable={show_in_tooltip:true}]
Setblock a nether or end portal:
/setblock ~ ~ ~1 nether_portal
Continuing to block with the shield, enter the portal
Look north (for the sake of the next step)
(In survival) Damage the player:
/damage @p 3 minecraft:mob_attack at ~ ~ ~-2
Notes
If the shield is in the off hand when you replicate this bug, you will be able to interact with your main hand in ways such as eating, attacking, and using other items
This issue used to occur previously if the player opened a GUI durring the brief time that their shield was disabled, but that is since not reproducable as a change in an unknown version made it so that player can interact with GUI containers durring that time period.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 39
relates to 3
Attachments
Comments 35
An easy way to set this up is to rig a dispenser filled with arrows to a tripwire hook (I've attached a screenshot). Just start blocking, then step through the tripwire while looking at the dispenser. Arrow fires, shield blocks it, dispenser GUI opens, then release the right mouse button. Now you're perma-blocking, but you can still sprint, swing your weapons, etc.
There is a bug very similar to this one that exists which makes your character block permanently until you die or reload the world. Even getting rid of the shield completely doesn't stop your character from blocking everything and basically being immortal. I don't know how to recreate that bug though, all I know is it's happened to me every single time in the final areas of my map.
I really hope they fix this bug soon as it's rather quite game breaking combat wise and the bugs have been there for ages and still exists in 1.9 itself.
@unknown Do you mean MC-156600 by the shield not blocking visually?
Requesting ownership of this issue to update information that is no longer accurate and maintain the issue as the original poster is inactive
This bug is still existent in 15w51b, how is this still not fixed yet? It's been there ever since shields came out.