-
Bug
-
Resolution: Fixed
-
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
-
Confirmed
-
(Unassigned)
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.
- is duplicated by
-
MC-112868 Visual Glitch - Item Durability reduced in both hands
- Resolved
- relates to
-
MC-86348 Cant use shears to break blocks in off hand but can still shear sheep
- Resolved
-
MC-112994 Interacting with shears on a snow golem always uses item in off-hand as well
- Resolved
-
MC-117586 Feeding a parrot uses item in off-hand as well
- Resolved
-
MC-99779 Right-clicking creeper with flint and steel uses item in off-hand as well
- Resolved