Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-163573

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.14.4, 19w41a, 19w42a, 19w44a, 19w45a, 19w45b, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w09a, 20w10a, 20w11a, 20w13a, 20w14a, 20w15a, 20w16a, 20w19a
    • None
    • Confirmed
    • Advancements

      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
      				}
      			}
      		}
      	}
      

            Unassigned Unassigned
            paint Paint
            Votes:
            8 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: