mojira.dev
MC-114718

Right clicking cake with empty main hand does not use item in off-hand

The bug

Right clicking a cake which cannot be eaten with an item with a right click action in the main hand will correctly use the item. However, if the cake is clicked with an empty main hand and the same item in the offhand instead, the item's action is not executed. This is inconsistent with all other blocks.

How to reproduce

  1. Place an item with right click ability like a fishing rod in your offhand

  2. Right click a cake with an empty main hand
    → You will notice that the fishing rod is not used

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1 (may no longer apply given 19w42a changes)

The respective methods overriding the method net.minecraft.block.Block.onBlockActivated(World, BlockPos, IBlockState, EntityPlayer, EnumHand, EnumFacing, float, float, float) return true if the currently held item is empty.

Related issues

Attachments

Comments

migrated
[media][media]
[Mod] Neko

Cake is MC-106826.

migrated

Confirmed for 1.13.1.

muzikbike

Affects 18w47b

muzikbike

Affects 18w49a

muzikbike

Affects 18w50a

marcono1234

@@unknown, you are now the reporter.

muzikbike

Seems a bit differeint in 1.14.3-pre3

muzikbike

This is fixed for cauldrons and fences in 19w42a. If what remains is truly covered by MC-106826 then this could be closed as fixed.

pulpetti

In 1.16.1 and 20w29a

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w17a.

Avoma

Can confirm in 1.17.

Avoma

Can confirm in 1.17.1.

Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2.

Avoma

Can confirm in 1.19.

Avoma

Can confirm in 1.19.2.

muzikbike

(Unassigned)

Confirmed

Gameplay

Low

Player

animation-testing-corner, cake, empty-hand, hand, hand-animation, item, main-hand, off-hand, right-click

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.2, Minecraft 18w03b, Minecraft 1.13, ..., 1.19, 1.19.2, 1.20.1, 1.21, 1.21.5

Retrieved