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
Type
/scoreboard objectives add UseShield minecraft.used:minecraft.shield
Type
/scoreboard objectives setdisplay sidebar UseShield
(to display value)Type
/scoreboard players set @s UseShield 0
(so the value is visible on sidebar)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
is duplicated by 3
relates to 3
Comments 22
Relates to MC-122656.
Affected in 15w38a