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

Holding item with CanPlaceOn data in offhand does not show block outlines in Adventure Mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.3, 1.19.4 Pre-release 2, 1.19.4 Pre-release 3, 1.19.4 Pre-release 4, 1.19.4 Release Candidate 2, 1.19.4, 23w12a, 23w13a, 23w14a, 23w17a, 1.20, 1.20.4
    • None
    • Confirmed
    • Adventure
    • Items
    • Low
    • Platform

      The Bug

      When holding an item with CanPlaceOn data while in Adventure Mode, you would expect to be able to see block outlines when you look at blocks that are specified in the item's CanPlaceOn list. This works perfectly for your mainhand, but fails for your offhand when you are not holding another interactable item in your mainhand that would be used instead. This is only a visual issue, as you may still place the item from your offhand against applicable blocks despite not being able to see the block outline.

      Steps to Reproduce

      • Place down a sandstone block, if there is not one nearby (could be any block, but use this for demonstration)
      • Give yourself a pig spawn egg (could be any interactable item, but use this for demonstration) with the following command:
      /give @s pig_spawn_egg{CanPlaceOn:["minecraft:sandstone"]}
      • Enter Adventure Mode
      • Look at sandstone block while holding the spawn egg in your mainhand
      • Observe the block outline is visible for the sandstone and no other blocks
      • Put the spawn egg into your offhand (and do not hold any other item in your mainhand that you could use/place on the sandstone instead)
      • Observe no block outline is visible for the sandstone despite holding an item with applicable CanPlaceOn data in your offhand
      • Use the spawn egg against the sandstone
      • Observe the pig spawns despite no block outline being visible for the block the spawn egg was used on

      These steps have also been recorded and attached to this report for ease of visualization (canplaceonbug.mp4).

            Unassigned Unassigned
            Evtema3 Evtema3
            Votes:
            6 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: