Wildcards
A wildcard lets one match key cover many damage ids, mobs, items or dimensions. They work everywhere a match key is used: the match of rules, and players' own names, tips and hidden damage (personal mode, ignoredDamageIds, renameMap, hintMap).
The two wildcard characters
| Character | Matches | Example |
|---|---|---|
* | Any text, also none | minecraft:*, *acid*, * |
? | Exactly one character | mob:minecraft:z?mbie |
- Matching is case-insensitive:
MINECRAFT:FALL,minecraft:outofworldand*OutOf*all matchminecraft:outOfWorld. - Every other character is plain text:
.is a dot, there are no regular expressions or[a-z]ranges. - A part must match the whole value:
minecraft:arrowdoes not matchminecraft:arrow_tipped,minecraft:arrow*does.
Where you can put a wildcard
Each part of a key can have its own wildcards. All parts must match.
| Part | Form | What it matches |
|---|---|---|
| Damage id | *, modid:*, mob:*, mob:modid:*, *text* | The damage id |
| Attacker | @*, @modid:*, *@modid:* | The entity id of the attacker (for projectiles: the shooter) |
| Item | @item:*, @item:modid:*, @item:*_sword | The item in the attacker's main hand |
| Dimension | @dim:*, @dim:modid:*, @dim:the_* | The dimension where it happened |
Every form and what it matches
| Key | Matches | Does not match |
|---|---|---|
* | Every damage (the catch-all) | - |
minecraft:* | Every damage id of vanilla: fall, lava, arrows, explosions ... | Melee hits (mob:minecraft:zombie starts with mob:) |
twilightforest:* | The damage ids a mod registered itself (twilightforest:lich_bolt) | Its mobs' melee, its mobs' vanilla arrows (minecraft:arrow) |
mob:* | Every melee hit by any entity, also players (mob:minecraft:player) | Arrows, explosions, magic of mobs |
mob:minecraft:* | Melee by vanilla mobs | Melee by modded mobs |
mob:alexsmobs:* | Melee by the mobs of one mod | - |
@twilightforest:* or *@twilightforest:* | Every hit whose attacker comes from that mod: melee, arrows, spells, explosions | Damage without an attacker (fall, lava) |
@* | Every hit that has an attacker | Fall, lava, drowning, the void ... |
@item:* | Hits by an attacker that holds something | Unarmed mobs, damage without an attacker |
@item:*_sword | Attackers holding any sword (iron_sword, diamond_sword, modded swords) | Bows, axes |
@dim:* | Every hit with a known dimension | - |
@dim:the_* | minecraft:the_nether, minecraft:the_end (the namespace may be left out) | minecraft:overworld |
*acid* | Every damage id containing "acid", for ids a mod builds at run time | - |
*:fall | fall of any mod | - |
unknown:* | Modded damage whose mod could not be found (before 1.19.4) | - |
@ alone means "the attacker"
@twilightforest:* and *@twilightforest:* are the same key: a key without a damage id matches any damage id. The *@ form is what the key builder writes.
Combined keys with several wildcards
Separate the parts with spaces or &, or write an @ part directly after the previous one. Each part may use its own wildcards:
{ "match": "mob:*:z* @minecraft:* @item:*_sword @dim:*overworld", "then": { "name": "Armed undead" } }This matches melee by a vanilla mob whose id starts with z (zombie, zombie villager, zoglin ...), holding a sword, in the Overworld.
What does not exist
| Written | What happens | Write instead |
|---|---|---|
mod:twilightforest or mod:* | Matches nothing: there is no mod: condition. /whm reload and the editor warn. | twilightforest:* (its damage ids), mob:twilightforest:* (its melee), @twilightforest:* (any hit by its mobs) |
minecraft:fall minecraft:lava | Matches nothing: every part of a key must match, and a hit has one damage id. Warned. | Two rules, one per damage id (or minecraft:* if that is what you mean) |
@item: or @ with nothing after it | Matches nothing. Warned. | @item:* for "holds anything" |
Order and priority
Pack rules: list order, wildcards count for nothing
Rules are checked from the top, and for each field the first matching rule that sets it wins. A wildcard rule above an exact rule hides the exact rule for the fields both set:
"rules": [
{ "match": "mob:*", "then": { "name": "Some mob" } },
{ "match": "mob:minecraft:pig", "then": { "name": "Pig", "hint": "Pigs do not attack." } }
]The pig gets the name Some mob (rule 1 sets the name first) and the tip from rule 2 (rule 1 sets no tip). Put special keys above general ones and the catch-all * last:
"rules": [
{ "match": "minecraft:arrow @minecraft:skeleton", "then": { "name": "Skeleton Sniper" } },
{ "match": "*@minecraft:skel*", "then": { "name": "Skeleton", "hint": "Use a shield." } },
{ "match": "mob:*", "then": { "name": "{attacker_name}" } },
{ "match": "*", "then": { "hint": "Check /whm for what hit you." } }
]A skeleton's arrow: name from rule 1, tip from rule 2. The pack editor's arrows move rules; the preview shows which rule sets each field.
Players' own entries: the most specific key wins
Players' own names and tips (personal mode, renameMap, hintMap) have no list order. Of the player's keys that match, the one that wins:
- has the most narrowing parts: every part counts, except a damage id made only of
*.@*,@item:*and@dim:*count, because they need an attacker, an item or a dimension; - on a tie, has fewer parts with wildcards;
- on a tie, comes first.
| Player's keys | Zombie with a sword | Fall |
|---|---|---|
* | wins | |
*@* | ||
mob:minecraft:* | ||
mob:minecraft:zombie @item:* | wins (2 parts) |
Without the last key, the zombie would get mob:minecraft:* (1 part, 1 wildcard) over *@* (1 part, 2 wildcards). The player's own ignore list hides a hit as soon as any key matches, so * there hides everything.
Where to click in the pack editor
Pick... next to the match key opens the match-key builder. The row of buttons under the list inserts wildcards:

| Button | Writes | Into |
|---|---|---|
* | * | The part of the list shown (Damage ids, Mobs, Items or Dimensions) |
<mod>:* (minecraft:* in the picture) | The mod of the picked row, or of the All mods filter when no row of that mod is picked. Grey mod:* until then. | The part of the list shown |
mob:* / mob:<mod>:* | mob:*; in the Mobs list with a picked row or mod filter mob:<mod>:* | Always the damage id field |
| Clear | Empties all four fields |
Examples:
| Goal | Clicks | Result |
|---|---|---|
| Any hit by a Twilight Forest mob | Mobs, mod filter Twilight Forest (or click one of its mobs), twilightforest:* | *@twilightforest:* |
| Melee of vanilla mobs | Mobs, click a vanilla mob, mob:minecraft:* | mob:minecraft:*@minecraft:zombie; empty the attacker field to keep only mob:minecraft:* |
| Every vanilla damage id in any dimension | Damage ids, mod filter Minecraft, minecraft:*, then Dimensions, * | minecraft:* @dim:* |
| Every hit by an armed attacker | Items, * | @item:* |
The fields under the buttons can also be typed into (wildcards allowed). OK puts the result into the rule.
The editor warns under the key field when a part matches nothing the server knows, and for the mistakes above. The preview of a wildcard key tests one real id that fits it (for mob:*@minecraft:skel*: mob:minecraft:skeleton by a skeleton).
Recipes
Rename every mob of a mod
{
"rules": [
{ "match": "*@alexsmobs:*", "then": { "name": "{attacker_name} &7(Alex's Mobs)" } }
]
}*@ covers melee, arrows and spells of those mobs. Use mob:alexsmobs:* for melee only.
Hide all damage from a mod until a quest is done
Two rules: the damage ids of the mod itself, and every hit by its mobs (which may use vanilla damage ids).
{
"rules": [
{ "match": "mekanism:*", "unless": ["ftbquests:1A2B3C4D5E6F7081"], "then": { "ignore": true } },
{ "match": "*@mekanism:*", "unless": ["ftbquests:1A2B3C4D5E6F7081"], "then": { "ignore": true } }
]
}To keep the hits but hide what caused them, use "hide": ["damage_id", "attacker", "mod", "weapon", "death_message"] and a name like "&k???" instead of ignore (see Progress).
One tip for a whole mod, better ones for its boss
{
"rules": [
{ "match": "twilightforest:lich_bolt @twilightforest:lich", "then": { "hint": "Reflect the bolts with a sword swing!" } },
{ "match": "@twilightforest:lich", "then": { "hint": "Break the shields first." } },
{ "match": "@twilightforest:*", "then": { "hint": "Twilight Forest mobs hit hard." } }
]
}Ids a mod builds at run time
{ "match": "*radiation*", "then": { "name": "Radiation", "ignore": true } }Careful: a damage id also contains mob ids (mob:somemod:radiation_zombie), so *radiation* matches that zombie's melee too. Use somemod:*radiation* to stay with damage ids.
Every armed mob, every PvP hit
{
"rules": [
{ "match": "mob:minecraft:player", "then": { "hint": "Another player got you." } },
{ "match": "@item:*", "then": { "hint": "{attacker_name} had a weapon: {weapon}." } }
]
}Tips per dimension
{
"rules": [
{ "match": "* @dim:the_nether", "then": { "hint": "Bring fire resistance to the Nether." } },
{ "match": "* @dim:twilightforest:*", "then": { "hint": "The Twilight Forest has its own bosses." } }
]
}Pitfalls
*at the top sets its fields for everything: no rule below can set them any more. Keep the catch-all last.mob:*is melee only. Arrows of a skeleton areminecraft:arrow, explosionsminecraft:explosion.player(minecraft:player_explosionfrom 1.19.4). Use*@<mod>:*or@*for "anything a mob did".<mod>:*is only what the mod registered. Many modded mobs use vanilla damage ids; those start withminecraft:.- Wildcards in
@,@item:and@dim:need a value.@*never matches fall damage,@item:*never matches an unarmed mob. - Every id has a namespace. A damage, attacker or item part without
modid:and without wildcard (zombie,@zombie) never matches; write@minecraft:zombieor*zombie*. The editor says so while you type and refuses to save such a key. - Text inside an id:
*slime*also matchesmob:minecraft:slime; add the namespace when that matters. - Dimensions: the namespace may be left out, with or without wildcards (
@dim:the_nether,@dim:the_*). On 1.12.2 and older, modded dimensions aredim:<name>(dim:twilight_forest), so@dim:twilight*and@dim:dim:*both work. - Damage ids differ between versions:
minecraft:outOfWorld(before 1.19.4) vsminecraft:out_of_world.*out*of*world*matches both. Modded damage whose mod could not be found isunknown:<type>before 1.19.4. - Personal ignore is "any key": a personal
*hides every hit for that player.
Checking a key
| How | Shows |
|---|---|
| Pack editor / personal mode / key builder | While you type: why a key can never match (no namespace, empty part), then the warnings below |
/whm reload | Warnings for keys that cannot match (mod:, empty parts, two damage ids, parts without namespace) |
/whm test <damage_id> [entity] [item] [dim] | Which rule sets each field for that hit, e.g. /whm test mob:somemod:beast or /whm test minecraft:arrow minecraft:skeleton |
| Pack editor preview | The same for the open rule, with one real id that fits its wildcards |
/whm search @modid | The real ids of a mod, to see what modid:* and @modid:* will cover |
