2

What is the criteria for a mob or a player to be on fire for a scoreboard? I tried stat.OnFire, stat.beOnFire, stat.burning., stat.burn and stat.isBurning.

1 Answer 1

3

There is no automated scoreboard statistic for being on fire. You will need to manually detect it instead.

For example, when not on fire, players will have a Fire value of -20, which would otherwise be the number of ticks until they are no longer on fire. You will need to set their score as if they are on fire first, and then change their score if they actually aren't.

For mobs, their Fire value is instead -1 when not on fire.

Prerequisites:

Dummy objective to manually track fire status.

/scoreboard objectives add OnFire dummy

Detection:

The following must be run in numerical order on a clock.

  1. Set their score to 1, indicating they are on fire.

    /scoreboard players set @a OnFire 1
    /scoreboard players set @e[type=Zombie] OnFire 1
    
  2. Set their score to 0 if they are not actually on fire.

    /scoreboard players set @a OnFire 0 {Fire:-20s}
    /scoreboard players set @e[type=Zombie] OnFire 0 {Fire:-1s}
    
  3. You'd then target players based on their "OnFire" score.

    /say @e[score_OnFire_min=1] is on fire.
    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .