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

enchantment_glint_override=true does not cause pick block to avoid replacing that item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.20.5 Release Candidate 2
    • None
    • Plausible
    • (Unassigned)

      Summary:
      As per MC-224072, which is intentional, when an item in the hotbar is enchanted, pick block avoids replacing that item if your hotbar is full. It will instead replace a different item in the hotbar. If all items in the hotbar are enchanted, it will replace the item that you have selected. Before 24w09a items with an empty enchantments NBT tag which still show the enchantment glint were avoided to be replaced by pick block too. This meant that you could give an empty enchantments NBT tag to all items in the hotbar to "fix" MC-224072 as it will always cause your selected item to be replaced. Now with the component system added in 24w09a you need to use enchantment_glint_override=true to have items that have enchantment glint without actually having enchantments. However these items will not be avoided to be replaced by pick block, making command creations that add the enchantment glint to all items in the hotbar useless. Relates to MC-224072, MC-269553 and MC-268802.

      Steps to reproduce:
      If you want to skip the upgrading process, you can just use the following command and attempt to replace it using pick block directly:

      /give @s minecraft:moss_block[enchantment_glint_override=true]
      1. Start version 1.20.4
      2. /give @p moss_block{Enchantments:[{}]} 1
      3. Make sure the moss block is in your hotbar and place items into every other hotbar slot
      4. Hold the moss with the enchantment glint in your hand
      5. Use pick block
      6. Notice that a different item than the moss with the enchantment glint was replaced
      7. Upgrade the world to the latest version
      8. Replace the item that you obtained using pick block with another item
      9. Hold the moss block with the enchantment glint in your hand again
      10. Use pick block again

      Observed results:
      The moss with the enchantment glint was replaced unlike in previous versions.

      Expected results:
      Pick block should replace a different item, since the moss block has an enchantment glint.

      Video:
      1.20.5 Release Candidate 2 0421 (1)(2).mp4
      1.20.4 0421 (1)(3).mp4

        1. 0421 (1)(2).mp4
          4.09 MB
        2. 0421 (1)(3).mp4
          1.73 MB

            Unassigned Unassigned
            EVGENSYPERPRO [Helper] EVGENSYPERPRO
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: