Rules
Everything a modpack changes about a death is a rule: a match key, optional conditions on the player's progress, and the actions - name, tip, death message, triggers, ignore, hide. With conditions a rule has two sets of actions: one for when they are met and one for when they are not met.
The server decides. It evaluates the rules for each player whenever it builds an output and sends only the finished result, so hidden information never reaches the client. There is no tick work.
A first rule


config/whathitme/pack/rules/bosses.json:
{
"rules": [
{
"match": "*@minecraft:wither_skeleton",
"if": ["advancement:minecraft:nether/find_fortress"],
"then": {
"name": "&8Ashen Sentinel",
"hint": "Its blade inflicts Wither. Carry a bucket of milk."
},
"else": {
"name": "???",
"hide": ["attacker", "mod", "weapon", "tip"]
},
"memo": "Unknown until the fortress is found"
}
]
}Until the player has found a fortress, the wither skeleton's hits are named ??? and the attacker, mod, weapon and tip are removed before anything is sent. Afterwards they show "Ashen Sentinel" with the tip, including old entries in /whm, because rules are evaluated every time an output is built.
Check it: /whm reload, then
/whm test mob:minecraft:wither_skeleton --as Steve
/whm test mob:minecraft:wither_skeleton --as Steve --assume advancement:minecraft:nether/find_fortressIn game, the same rule in the pack editor:

Rule fields
| Field | Type | Meaning |
|---|---|---|
match | string, required | Match key of the record: damage id, @entity, @item:, @dim:, wildcards. "*" matches every damage. |
if | condition or list | All of these must be true |
any | condition or list | At least one must be true |
unless | condition or list | None of these may be true |
then | actions | Without conditions: always used. With conditions: used when they are met. |
else | actions | Only with conditions: used when they are not met |
memo | string | Your note, never shown to players |
enabled | boolean | false keeps the rule in the file but does not use it ("Rule on" in the editor) |
Actions
| Action | Type | Meaning |
|---|---|---|
name | string | The name shown for the hit. Template variables, & colors, lang: keys. (Names, tips, ignore & hide) |
hint | string | The tip. Same syntax. |
deathMessage | string | The death message of a death by this hit (Death messages) |
triggers | object | { "commands": [...], "oncePerPlayer": false, "cooldownSeconds": 0 } - console commands on a matching death (Triggers) |
ignore | boolean | true: hidden like the [Mute] button, also left out of totals, counts and /whm stats (the killing blow too). false: explicitly not ignored. |
hide | list | Parts shown as ??? and never sent (hide) |
An empty or missing action is "not set": the next rule (or the built-in behaviour) decides that field. "hint": "" does not remove the tip; use "hide": ["tip"].
Priority
The rules of all pack files form one list: files in load order, rules in the order inside each file (the pack editor's arrows move them). Rules added by scripts come after the files.
For every field separately, the first rule from the top wins whose match key fits and whose active branch sets that field:
"rules": [
{ "match": "*@minecraft:wither", "then": { "name": "&5The Withered King" } },
{ "match": "*@minecraft:*", "then": { "hint": "Bosses hit hard: bring a shield." } },
{ "match": "*", "then": { "deathMessage": "{player} was defeated by {name}" } }
]A death by the Wither gets its name from rule 1, its tip from rule 2 and its death message from rule 3. Put special rules above general ones; there is no "most specific wins". How wildcard rules and exact rules interact: Wildcards: order and priority.
hidecounts as one field: the first rule that hides something decides the whole list.triggers: only the first rule with triggers runs for a death.ignore: falseis a value: it stops later rules from ignoring the damage.- A rule whose conditions are not met and that has no
elsesets nothing; later rules decide.
The preview
The pack editor shows, at the end of every rule, "For this hit it becomes:" - the same output as /whm test for that match key, with the rule each field comes from:

Pick the player whose progress to use (As) and type conditions to treat as met, then Test. The preview shows the saved rules: press Done first after a change.
When rules are evaluated
Whenever the server builds an output for a player:
- death recap, respawn summary, alerts,
/whm history,last,snapshot,inspect(with the inspected player's progress),/whm searchentries,- template previews,
- death messages and triggers.
Nothing is cached between outputs, so completing a quest reveals old entries at once.
Players and personal entries
- A player's personal name, tip or hidden damage (personal mode,
[Mute]) wins over a rule's name / tip, unless the active branch hides something (then personal names, tips and templates do not apply to that record), or the modpack locks personal entries. - Players without the mod get the server's English chat with the rules applied. On Forge / NeoForge the vanilla death message cannot be changed for them, so a hidden killer may still appear there. Use
requireClientModif that matters. Fabric servers replace the death message for everyone.
Requirements
Rules need the mod on the server (or single player). In client-only mode the client's own pack gives names, tips and ignore; conditions count as not met and nothing is hidden.
More examples
See the Cookbook for ready-to-copy rules: hide everything in a dimension until it is unlocked, tips that change after a few deaths, FTB Quests and Game Stages examples, a reward on the first death to a boss.
