Skip to content

Conditions ​

Conditions are used by rules (if, any, unless) and by the unlock conditions of settings. Each condition is prefix:argument. A ! in front negates it.

json
"if":     ["advancement:minecraft:story/enter_the_nether", "score:deaths>=3"],
"any":    ["tag:nether_guide", "tag:veteran"],
"unless": ["!advancement:minecraft:story/mine_diamond"]

This page covers the conditions built into Minecraft. Quest mods and scripts add more prefixes: see Quest mods and Script integration.

Built-in conditions ​

ConditionTrue whenExample
advancement:<id>The player has completed the advancementadvancement:minecraft:end/kill_dragon
tag:<tag>The player has the scoreboard tag (/tag command)tag:veteran
score:<objective><op><n>The player's score compares true. Ops: >= > <= < = !=. No score = false.score:deaths>=3
!<condition>The condition is false!tag:veteran

How the lists combine: all of if and at least one of any (when given) and none of unless.

Other prefixes ​

PrefixFromPage
ftbquests:<id>FTB QuestsFTB Quests
bq:<id>Better Questing (also the GTNH fork, Better Questing Unofficial and 4.x)Better Questing
heracles:<id>Heracles / Odyssey QuestsHeracles / Odyssey Quests
stage:<name>Game StagesGame Stages
script:<name>A KubeJS / CraftTweaker / MineTweaker script, or another mod through the Java APIScript integration

Quest mods ​

Quest progress can be used in the same lists, and several quest mods can be mixed in one rule. Which quest mod works on which Minecraft version, and how to combine them, is on Quest mods (matrix).

Script mods on every version

KubeJS, CraftTweaker and command blocks can drive rules on every version: let them set a scoreboard tag or score, and use tag: / score: conditions. Where a binding exists, scripts register script: conditions directly (script integration).

Built-in conditions per Minecraft version ​

Condition1.7.10, 1.8.91.9 - 1.11.21.12+
advancement:not supportednot supported✔
tag:not supported✔✔
score:✔✔✔

Same on Forge, Fabric and NeoForge. Advancements do not exist before 1.12 and entity tags not before 1.9. An unsupported condition counts as false and /whm reload says "not supported on Forge 1.x". On 1.7.10 / 1.8.9, use a score as a flag instead of a tag: score:veteran>=1.

Finding the ids ​

ConditionWhere to find the value
advancement:The advancement id. /advancement grant @s only suggests every id while you type. Mods use their own namespace (twilightforest:progress_lich).
tag:Any name you give with /tag <player> add <tag> (1.13+) or /scoreboard players tag <player> add <tag> (1.9 - 1.12.2)
score:The objective name of /scoreboard objectives add <name> <criterion>. Criteria like deathCount or minecraft.killed:minecraft.wither count for you.

The pack editor lists the advancements, objectives and tags the server knows, so you can click them instead of typing.

Checking conditions ​

  • /whm reload lists unknown prefixes, conditions without prefix, missing mods, conditions unsupported on this version and bad arguments (for example a malformed score:).
  • /whm test <damage_id> ... --as <player> evaluates the rules with that player's real progress.
  • --assume <condition> treats a condition as fulfilled, --assume !<condition> as not fulfilled. Repeat it for several conditions.
/whm test minecraft:generic twilightforest:lich --as Steve --assume advancement:twilightforest:progress_lich --assume !tag:veteran

Made by junjun1z. The mods are MIT licensed.