mojira.dev
MC-270781

The progress trigger "any_block_use" cannot be detected default right-click blocks

In the changelog for 24w03a, it is mentioned that "which triggers due to any type of interaction with a block by a player, such as using an item on the block or its default usage"

However, if you right-click on a default block (you can't interact with the GUI or change the state of the block, etc.), you won't be able to trigger the trigger.

In this case, it is the same as default_block_use..?

Attachments

Comments 3

Please update the description to include steps to reproduce this issue, as well as expected VS observed results.

Please also attach any needed datapacks, resourcepacks, screenshots, videos or worlds needed to help reproduce this issue.

Maybe there's something wrong with the translator description
What I'm trying to say is that any_block_use my personal testing has found that only the quasi-test is only useful for blocks that can be right-clicked, not any form of player interaction with the block described in the changelog 24w03a

I don't know if it's a problem with my understanding, but I think any right-click trigger should trigger this criterion, including blocks that don't react when right-clicked, such as right-clicking bedrock with any pickaxe

However, this is not the case: right-clicking on a non-functional block will not trigger this criterion
For example, try to detect when the player right-clicks on bedrock
Here's the progress JSON in the datapack/advancements

{
    "criteria": {
        "requirement": {
            "trigger": "minecraft:any_block_use",
            "conditions": {
                "player": [
                    {
                        "condition": "minecraft:entity_properties",
                        "entity": "this",
                        "predicate": {}
                    }
                ],
                "location": [
                    {
                        "condition": "minecraft:location_check",
                        "predicate": {
                            "block": {
                                "blocks": "minecraft:bedrock"
                            }
                        }
                    }
                ]
            }
        }
    }
}

But replace bedrock with crafting_table

{
    "criteria": {
        "requirement": {
            "trigger": "minecraft:any_block_use",
            "conditions": {
                "player": [
                    {
                        "condition": "minecraft:entity_properties",
                        "entity": "this",
                        "predicate": {}
                    }
                ],
                "location": [
                    {
                        "condition": "minecraft:location_check",
                        "predicate": {
                            "block": {
                                "blocks": "minecraft:crafting_table"
                            }
                        }
                    }
                ]
            }
        }
    }
}

Right-click to open the Crating Table GUI and determine that the progress is triggered

The way to detect that progress is triggered is to use

/advancement revoke <player> <namespace>:<advancement_id>

If the trigger doesn't work, the player doesn't own the progress

Succeed on the contrary

So I think the any_block_use criterion should be to interact with any block in any form (including the normal right-click).

I believe there's some confusion here what these triggers are about.

I've attached a video that shows the difference between the two:

[media]

. The data pack used there is

[media]

.

From my understanding, default_block_use triggers if the block interacted with has a right-click action associated with it, e.g. furnaces, bells, or trapdoors. any_block_use triggers if you need a specific item to interact, e.g. an axe to deoxidize copper, a hoe to till dirt (not shown in video), or just placing a block (including shift-clicking to place the block).

The main reason for the distinction between these two is probably the introduction of copper doors and trapdoors, which have two distinct interactions with the block.

There is no way currently to detect right-clicking a block if the game doesn't expect some interaction to happen already; the game doesn't register a "block use" in this case. Adding such an advancement trigger would be a feature request, not a bug.

Please let me know if I that clarified it!

zChenX

(Unassigned)

Unconfirmed

(Unassigned)

1.20.5 Pre-Release 2

Retrieved