Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-114718

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.2, Minecraft 18w03b, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w47a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w04a, Minecraft 19w08a, Minecraft 19w12a, Minecraft 19w12b, Minecraft 19w13a, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 5, Minecraft 1.14.3 Pre-Release 4, 1.14.4, 19w35a, 19w36a, 19w37a, 19w38b, 19w39a, 19w40a, 19w41a, 19w42a, 19w44a, 19w45a, 19w46a, 19w46b, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 6, 1.15 Pre-release 7
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      Player

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Awesoman3000 Connor Steppie
              • Votes:
                6 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: