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
- 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));.
2015-09-03, 12:39 AM
2020-05-06, 02:25 PM
2020-05-06, 02:25 PM
42
23
blocking, scoreboard, shield, statistics
Minecraft 15w36c - 20w15a
Minecraft 15w36c, Minecraft 15w37a, Minecraft 15w38a, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47b, Minecraft 15w47c, Minecraft 16w04a, Minecraft 16w05b, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 1.10.2, Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w18b, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w14a, Minecraft 18w14b, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1, 1.15.1, 1.15.2 Pre-release 2, 20w09a, 20w15a