Repository navigation
Writing Rules
Sokratis Fotkatzikis edited this page Nov 4, 2026
·
1 revision
Each rule is a line of fields separated by |.
-
*means "all". Use it in place of a mob ID to apply a rule to every mob, and in place of an item, dimension or biome where noted.*never includes players; add aminecraft:playerline if you want to affect them too. -
Entity IDs can also be a tag or a whole mod.
#c:bossestargets an entity type tag, andmodid:*targets every mob registered by that mod. -
Optional fields can be left out. Leave them off the end of a line, or write
?to skip one and set a later field. Dimensions and biomes default to all of them. -
The namespace is optional for vanilla. IDs without one use
minecraft, sozombieandminecraft:zombieare the same. Modded IDs still need theirs. -
Precedence differs by rule type. Mob Stats and Behavior's
attributeOverrides,damageModifiersandexperienceModifiers, plusdespawnRanges, use "narrowest wins": a specific mob ID beats a tag, which beatsmodid:*, which beats*, and a per-dimension line beats an every-dimension line for the same mob. Custom Mob Drops and Custom Mob Spawning rules instead apply every matching line.
See Configuration Reference for the full field format of every setting.