Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-87949

The shield use statistic is not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 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
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      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));.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                39 Vote for this issue
                Watchers:
                25 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: