The bug
Blocks cannot be placed on fences with the off-hand.
How to reproduce
Hold torch in offhand
Right click on top of a fence
You can't place it
Code analysis
The method net.minecraft.block.BlockFence.onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
returns true
if your mainhand is empty or holding a lead. This is also the reason for MC-21433. Since the method returns true
when there's nothing in your mainhand, the offhand is ignored.
Linked issues
is duplicated by 11
relates to 5
Attachments
Comments 55
Confirmed for
16w15b
When you hold SHIFT you are able to place the block, however for the mainhand this is not the case, see MC-93651
Same reason as for MC-93651
The client thinks it interacted with its mainhand with the fence, and because of this does not try to use the offhand.
Likely caused by fences having a right click action (for leashes).