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

Interacting with shears on sheep always uses item in off-hand as well

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 15w36c, Minecraft 15w36d, Minecraft 15w44b, Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w35a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 5, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 19w04b, Minecraft 19w05a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      When you have shears in your main-hand and any other item with right click ability in your off-hand, the item in the off-hand will be used as well when you right click on a sheep to shear it.

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.entity.passive.EntitySheep.processInteract(EntityPlayer, EnumHand) is not returning true when the sheep was successfully sheared, therefor it calls the overridden method net.minecraft.entity.passive.EntityAnimal.processInteract(EntityPlayer, EnumHand) which fails because shears are not the item required to breed sheep. This makes the game try to use the offhand as well.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chriswedge100@gmail.com Chris Wedge
              • Votes:
                7 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: