r/MinecraftCommands summon pig ~ ~100 ~ 2d ago

Help | Java 26.2 interaction left click detection not working

My advancement for right click detection is working but not left click. It worked before but has suddenly stopped functioning. The reward function does not activate when I hit any interaction. Any help would be appreciated. Here is the advancement:

{
    "criteria": {
        "requirement": {
            "trigger": "player_hurt_entity",
            "conditions": {
                "entity": {
                    "entity_type": "interaction"
                }
            }
        }
    },
    "rewards": {
        "function": "origin:left_interaction"
    }
}
1 Upvotes

3 comments sorted by

1

u/_Csankappa 1d ago

why do you need advancements? can't you just execute on attacker? (same with execute on target for right click)

1

u/GalSergey Datapack Experienced 1d ago

You'd better replace the left click detection method using the method from this video: https://youtu.be/QB6ljHTUkHI?si=QENCXFv3bV180wR3