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

Carrot on a stick usage statistic value is increased even if item is not used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.11.2, Minecraft 1.12, Minecraft 1.12.2, Minecraft 17w47b, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w11a, Minecraft 1.13-pre1, Minecraft 1.13.1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w04b, Minecraft 19w05a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      Items

      Description

      The bug

      When you right click with a carrot on a stick it always increases the usage statistic value for it even if you did not really use it.

      I know that this is a technique used by map makers, but it would be better to have a generic way to detect right clicks than to rely on situations like this.

      How to reproduce

      1. Add an objective with the minecraft.used:minecraft.carrot_on_a_stick criteria, set it to display on your sidebar, and set your score to 0 so it displays
        /scoreboard objectives add carrotOnAStick minecraft.used:minecraft.carrot_on_a_stick
        /scoreboard objectives setdisplay sidebar carrotOnAStick
        /scoreboard players set @s carrotOnAStick 0
        
      2. Right click with a carrot on a stick while not riding a pig

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.item.ItemCarrotOnAStick.onItemRightClick(World, EntityPlayer, EnumHand) always increases the usage statistic value.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  CHK: