mojira.dev
MC-88014

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

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.

Linked issues

Comments 3

Confirmed for 16w06a

Cannot reproduce aince 19w37a.

Chris Wedge

(Unassigned)

Confirmed

(Unassigned)

interact, off-hand, shears, sheep

Minecraft 15w36c, Minecraft 15w36d, Minecraft 15w44b, Minecraft 16w05b, Minecraft 16w06a, ..., Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 19w04b, Minecraft 19w05a

19w37a

Retrieved