mojira.dev
MC-99688

Shield disabling by axes: It doesn't actually disable

This is a simple bug. When an axe disables your shield, you can still block by holding right-click. It just doesn't show you blocking (To you and to others), but it still blocks.

How to reproduce:
1- Get a player to sprint and hit you with an axe while you are blocking with shield
2- Hold right-click and get the player to hit you
3- You notice the damage was blocked.


Code analysis by @unknown in this comment.

Linked issues

Comments 11

can confirm for 16w39a. tested on LAN, their shield icon had the white disable effect, but hitting them had no effect.

specifically, disabling appears not to force you to unblock, but to prevent you blocking again after you unblock for the duration. that is, if it is disabled, you can stay blocking, but if you unblock, you cannot reblock. tested and I took damage if unblocked and reblock, but not if I never stopped blocking

this is in 39c

Confirmed for

  • 16w40a

I just tested this in 16w40a, I don't even need to hold right-click. It will continuously Block

1 more comments

No, what @unknown said is correct, right-clicking with the shield has no effect at all, the player just keeps blocking.

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The problem is that the game only sets a cooldown for shields but does not actually disable the currently used shield. To fix this, the methods net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(Entity) and net.minecraft.entity.monster.EntityMob.attackEntityAsMob(Entity) should probably call the method net.minecraft.entity.EntityLivingBase.resetActiveHand() as well when they set the cooldown for the shield.

Note: The bug that the player keeps blocking without holding a the use item key is caused by MC-86252.

It works even if you don't press right click after the first hit, this breaks completly PvP Axe Mechanic.

In 17w17b I haven't been able to reproduce this with Vindicators in singleplayer (shield is disabled and damage not blocked), though I'm not sure if multiplayers work the same way..

It looks like this was already fixed in 1.11.2 (if not earlier)

PgSuper

(Unassigned)

Community Consensus

Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 16w39a, Minecraft 16w39c, Minecraft 16w40a

Minecraft 1.11.2

Retrieved