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
relates to4
Created Issue:
Holding wheat and shears and pressing use feeds sheep and shears it
Hold wheat in off-hand and shears in main hand and click on a sheep. The sheep is shorn and at the same time heart particles appear and one wheat is used.
Environment
Windows 7 Java 64-bit
relates to
Hold wheat in off-hand and shears in main hand and right-click on a sheep. The sheep is shorn and at the same time heart particles appear and one wheat is used.
Hold wheat in off-hand andshears in mainhand and right-clickon a sheep. The sheep is shorn and at the same time heart particles appear and one wheatis used.The bug
When you have shears in your mainhand and any other item with right click ability in your offhand, the item in the offhand 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.
Holding wheat and shears and pressing use feeds sheep and shears itRight clicking with shears on sheep always uses item in offhand as well
is duplicated by
relates to
relates to
Right clicking with shears on sheep always uses item in off-hand as well
Right clicking with shears on sheep always uses item in off-hand as wellInteracting with shears on sheep always uses item in off-hand as well
relates to
The bug
When you have shears in your main-hand and any other item with right click ability in your offhand, 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.
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.
Confirmed.
Confirmed for 16w06a
Cannot reproduce aince 19w37a.