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:
Download the attached data pack
and add it to a world
Place a dropper, and then inside it, place 8 dirt in the center, and 1 wheat seeds in each other slot
Close, then open the dropper
❌ You will not receive the advancement anymore, but it can still be granted with commands (
/advancement grant @s only item:open_dropper
)Redo the same experiment in 1.20.4
✔ 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.
Linked issues
Attachments
Comments 6
I'd rather say add a separate trigger for item use attempt; item used on block now actually triggers when said item is used on a block, not just attempted to be used. Either case, it's loss of functionality which should be a valid issue.
I would also like to note that for some reason, if you place a block on a replaceable block (i.e. short grass), any advancements that match its item_used_on_block trigger will be activated, despite not having interacted with it
It doesn't happen if you place it on a non-replaceable block, and it doesn't match the advancement criteria. The block the criteria calls for is not being right-clicked, if you place a note block for instance it won't trigger the music note to play here, but it would trigger the advancement for using it.
The previous behaviour was widely used by data packs. Being able to detect players using items on blocks is something that really pushed data packs forward.
I'm part of a team maintaining 88 data packs which aim to smoothly integrate into vanilla. The `item_used_on_block` trigger was what finally freed us from the so called 'floor crafting', where we could only react to players throwing items on the ground, and enabled us to do less floor crafting. If this went through it would break a lot of stuff and throw us back to having the player throw items on the ground. Please reconsider this change.
Below are some examples on how the previous behaviour was used:
Our custom liquid storage blocks
These tile-entity-relocators
Our enchantment extractor machine
Or this multi block ingot doubler
In all of these packs the initial crafting relies on our Custom Crafting system, which allows for NBT crafting (as NBT crafting is not available via recipes in the normal Crafting Table). This is only possible thanks to the item used on block trigger.