mojira.dev
MC-87949

The shield use statistic is not working

The bug

The scoreboard objective type minecraft.used:minecraft.shield does not work. I expected it to increase when a player blocks with a shield, however this is not the case.

How to reproduce

  1. Type /scoreboard objectives add UseShield minecraft.used:minecraft.shield

  2. Type /scoreboard objectives setdisplay sidebar UseShield (to display value)

  3. Type /scoreboard players set @s UseShield 0 (so the value is visible on sidebar)

  4. Block with shield while taking damage from a mob
    → ❌ Notice the value hasn't increased

Code analysis

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why the statistic value is not increasing is because the method net.minecraft.item.ItemShield.onItemRightClick(ItemStack, World, EntityPlayer, EnumHand) is not calling playerIn.triggerAchievement(StatList.func_188057_b(this));.

Linked issues

Comments 22

Affected in 15w38a

This bug is still existent in 15w46a, someone please update the effected
versions.

Confirmed that this still effects 15w47a.

The bug is Still existent in 15w47b.

12 more comments

Confirmed for 19w41a

Confirmed for 20w09a

 

Confirmed in 20w15a

marcono1234

eowyn36

Confirmed

Statistics

blocking, scoreboard, shield, statistics

Minecraft 15w36c, Minecraft 15w37a, Minecraft 15w38a, Minecraft 15w45a, Minecraft 15w46a, ..., Minecraft 1.13.1, 1.15.1, 1.15.2 Pre-release 2, 20w09a, 20w15a

20w19a

Retrieved