Match keys
Every place that picks damage - the match of a rule and the keys of players' own names, tips and hidden damage - uses the same match key syntax.
The simplest key: a damage id
"minecraft:lava": "..."
"mob:minecraft:zombie": "..."See Damage ids for how ids are built.
Composite keys
Add conditions to narrow the match. Write them in any order, separated by spaces or &:
| Condition | Matches | Example |
|---|---|---|
<damage id> | The damage id | minecraft:arrow, mob:minecraft:zombie |
@<entity id> or @mob:<entity id> | The attacker's entity id (@entity: works too) | @minecraft:skeleton |
@item:<item id> | The item in the attacker's main hand | @item:minecraft:iron_sword |
@dim:<dimension id> | The dimension where it happened | @dim:minecraft:the_nether |
All conditions must match.
{
"rules": [
{ "match": "mob:minecraft:zombie @item:minecraft:iron_sword", "then": { "name": "Armed Zombie" } },
{ "match": "minecraft:arrow @minecraft:skeleton", "then": { "name": "Skeleton Sniper" } },
{ "match": "minecraft:lava @dim:minecraft:the_nether", "then": { "name": "Nether Lava" } }
]
}Writing conditions without a space
A condition starting with @ can follow another one directly:
*@twilightforest:lich any damage from the Lich
minecraft:arrow@twilightforest:skeleton_druid that mob's arrowsDimensions
@dim:the_nether (without namespace) also matches minecraft:the_nether.
Wildcards
Every condition may use * (any text) and ? (one character). Matching is case-insensitive. Wildcards lists every form, the key builder buttons, recipes and pitfalls.
| Key | Matches |
|---|---|
*@twilightforest:lich or @twilightforest:lich | Every hit by the Lich, whatever damage id its attacks use |
@twilightforest:* | Any attacker from Twilight Forest |
mob:lycanitesmobs:* | Melee attacks of every Lycanites Mobs creature |
*acid* | Every damage id containing "acid" (useful for ids a mod builds at run time) |
minecraft:arrow @twilightforest:skeleton_druid | Only that mob's arrows |
* | Everything (put it last: a catch-all) |
Large packs
Wildcards keep long lists short. Instead of one key per attack of a boss or per damage id of a mod, write *@twilightforest:lich (every hit by the Lich), @twilightforest:* (every Twilight Forest attacker) or *acid* (every damage id containing "acid"). See Large packs.
Which key wins?
There is no "most specific key wins" (see Wildcards: order and priority). Rules are checked from the top, and for each field the first rule that matches and sets it wins. Put special keys above general ones:
| Order | Key | Result for the Lich's bolt |
|---|---|---|
| 1 | twilightforest:lich_bolt @twilightforest:lich | its tip wins |
| 2 | @twilightforest:lich | used for the Lich's other attacks |
| 3 | * | used when nothing above sets a tip |
Players' own entries (personal mode) pick the most specific of their own keys (more conditions, then fewer wildcards); their own ignore list hides a hit when any of the player's keys matches.
Finding the right ids
| Need | Use |
|---|---|
| Damage id of a hit | Hover text ID: ... or [Copy ID] |
| Entity ids, damage ids of a mod | /whm search @modid |
| Browse everything | The pickers of the pack editor: damage ids, mobs, items, dimensions with filters |
| Test a key | /whm test <damage_id> [entity] [item] [dim] |
