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

Changes to item_used_on_block advancement criteria breaks previous functionality

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w03a
    • 23w51a, 23w51b
    • None
    • Confirmed
    • Advancements, Data Packs
    • Very Important
    • 1158920
    • Expansion B

      Moderator Note by zTxrbq

      Please limit your comments to new information about the bug. If you are also affected and would like to express this, please use the "Vote" feature.
      Comments that do not add value, repeat what has already been said, or contain other suggestions will be removed.
      This is not the place to make suggestions. Instead, please direct your suggestions and feedback to the appropriate channels, such as the feedback site or feedback discord server.

      A change was made to the item_used_on_block advancement criteria in this snapshot(s) such that the criteria only triggers/grants if the action made a change to the block, in order to fix an inconsistency with using axes on Waxed Copper Doors and Trapdoors (MC-266055). However, this change breaks previous functionality by no longer allowing the criteria to trigger when interacting with any block unless the use caused some action.

      This behavior was used previously by data pack authors to detect when players interacted with any number of blocks, and in particular, block entities – with or without items – and is not easily replicable without.

      Steps to reproduce:

      1. Download the attached data pack Item Used on Block Example.zip and add it to a world
      2. Place a dropper, and then inside it, place 8 dirt in the center, and 1 wheat seeds in each other slot
      3. Close, then open the dropper
      4. You will not receive the advancement anymore, but it can still be granted with commands (/advancement grant @s only item:open_dropper)
      5. Redo the same experiment in 1.20.4
      6. Notice that you receive an advancement, signified by a chat message and sound. The advancement revokes, so you can repeat this.

      This is an unannounced feature change that impacts many existing data packs.

            billy.sjoberg [Mojang] Billy Sjöberg
            kanokarob Robert Duke
            Votes:
            91 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: