mojira.dev
MC-115149

`source_entity` doesn't function correctly as advancement trigger condition

If I set up an advancement with the following JSON data:

{
    "display": {
        "icon": "minecraft:wool",
        "title": "Arrow damage test"
    },
    "parent": "minecraft:testing/root",
    "criteria": {
        "take_arrow_damage": {
            "trigger": "minecraft:player_damaged",
            "conditions": {
                "damage": {
                    "source_entity": {
                        "type": "arrow"
                    }
                }
            }
        }
    }
}

The advancement doesn't seem to trigger, even after taking arrow damage. Changing this to `skeleton` also seems not to work, which makes me think either I'm missing the point or this might be broken.

Linked issues

Comments 3

After checking other instances of "entity" in 17w13b, I've expanded the original MC-115067 to include all instances and am resolving this report to that one.

I am pretty sure you are missing the damage type key after the damage key, but even with that it does not work correctly

Edit: "damage type" is only the describing name, sorry

@unknown: his structure was correct. Here is an example of correct structure where the advancement works:

{
    "criteria": {
        "findme": {
            "trigger": "minecraft:player_damaged",
            "conditions": {
                "damage": {
                    "is_fire": false
                }
            }
        }
    }
}

The issue is source_entity specifically, in all cases of its use.

Ethan Brooks

(Unassigned)

Unconfirmed

Minecraft 17w13a

Retrieved