mojira.dev
MC-163573

Advancement criteria is_fire doesn't work if the fire weapon kills the entity directly.

The Bug

Using the advancement criteria `player_killed_entity`, you can use the further criteria `killing_blow` to further define the criteria, and even further define that by using `is_fire`, which works when the entity dies of the flames as a result of using a flame bow or fire aspect sword, but not if the flame bow or fire aspect sword kills the entity directly.

How to Reproduce

1. Download the datapack I've attached. It has two advancements:

  • One tick advancement to tell you you've downloaded the pack successfully (potion icon),

  • Another advancement (fire charge icon) that uses the following criteria:

    "is_fire": {
          "trigger": "minecraft:player_killed_entity",
          "conditions": {
            "killing_blow": {
              "is_fire": true
    			}
    		}
    	}

2. Experiment with the advancement and see when it does and doesn't trigger.

You'll find that entities who die of the resulting flames of Fire Aspect and Flame will trigger the advancement, but not if those weapons kill the entity directly. This is inconsistent with how loot tables decide whether or not to cook a dying mob's meat (See the resolved MC-1079).

The same is true for is_lightning. Entities killed by channeling tridents directly won't trigger advancements with is_lightning=true.

Workaround

Use is_on_fire flag field. Example:

"kill_a_burning_cow": {
      "trigger": "minecraft:player_killed_entity",
      "conditions": {
			"entity": {
				"type": "cow",
				"flags": {
					"is_on_fire": true
				}
			}
		}
	}

Attachments

Comments 2

Confirmed. This might be intended though, since it also doesn't trigger if you kill a mob with a regular weapon while it happens to be on fire. Seems to be checking the type of damage, not the status of the mob, unlike loot tables.

Could you please attach an updated datapack which works in the latest version? The synax of advancements has changed since the last confirmation version 20w19a.

Paint

(Unassigned)

Confirmed

Advancements

1.14.4, 19w41a, 19w42a, 19w44a, 19w45a, ..., 20w13a, 20w14a, 20w15a, 20w16a, 20w19a

Retrieved