Skip to content

Cookbook ​

Ready-to-copy pack files. Put each one into config/whathitme/pack/ (any file name ending in .json), run /whm reload, and check it with /whm test or the preview of the pack editor.

Damage ids differ between versions

The examples use common vanilla ids. Some names differ between Minecraft versions (minecraft:outOfWorld before 1.19.4, minecraft:out_of_world after). Check yours with /whm search or the damage id picker of the pack editor.

Names and tips ​

Friendly names for vanilla damage ​

json
{
  "rules": [
    { "match": "minecraft:outOfWorld", "then": { "name": "&5The Void" } },
    { "match": "minecraft:inWall", "then": { "name": "Suffocation" } },
    { "match": "minecraft:cramming", "then": { "name": "Too Many Entities" } },
    { "match": "minecraft:flyIntoWall", "then": { "name": "Kinetic Energy" } }
  ]
}

One tip for a whole mod, a better one for its boss ​

The first rule from the top that sets a tip wins, so put the special rules first:

json
{
  "rules": [
    { "match": "twilightforest:lich_bolt @twilightforest:lich", "then": { "hint": "Reflect the Lich's bolts with a sword swing!" } },
    { "match": "@twilightforest:lich", "then": { "hint": "Hit the Lich's shields first, then attack it directly." } },
    { "match": "@twilightforest:*", "then": { "hint": "Twilight Forest mobs hit hard. Bring better armor than in the Overworld." } }
  ]
}

Tips per dimension ​

json
{
  "rules": [
    { "match": "minecraft:lava @dim:minecraft:the_nether", "then": { "hint": "Carry Fire Resistance potions in the Nether." } },
    { "match": "minecraft:fall @dim:minecraft:the_end", "then": { "hint": "Bring Slow Falling or a water bucket to the End." } },
    { "match": "* @dim:mypack:deep_dark_dimension", "then": { "hint": "Nothing here is fair. Bring friends." } }
  ]
}

Different names for armed mobs ​

json
{
  "rules": [
    { "match": "mob:minecraft:zombie @item:*diamond*", "then": { "name": "&bWell-Equipped Zombie" } },
    { "match": "mob:minecraft:zombie @item:minecraft:iron_sword", "then": { "name": "Armed Zombie" } },
    { "match": "minecraft:arrow @minecraft:skeleton", "then": { "name": "Skeleton Sniper" } }
  ]
}

Translated tips ​

json
{
  "rules": [
    { "match": "minecraft:lava", "then": { "hint": "lang:mypack.hint.lava" } },
    { "match": "mob:minecraft:creeper", "then": { "hint": "lang:mypack.hint.creeper" } }
  ]
}

Then in a resource pack: assets/mypack/lang/en_us.json, ja_jp.json, ... with "mypack.hint.lava": "...".

Hiding noise ​

json
{
  "rules": [
    { "match": "minecraft:cactus", "then": { "ignore": true } },
    { "match": "minecraft:sweetBerryBush", "then": { "ignore": true } },
    { "match": "*radiation_tick*", "then": { "ignore": true } }
  ]
}

Wildcards ​

One rule for a whole mod. Every form, the key builder buttons and the pitfalls: Wildcards.

Rename every mob of a mod ​

json
{
  "rules": [
    { "match": "*@alexsmobs:*", "then": { "name": "{attacker_name} &7(Alex's Mobs)" } }
  ]
}

*@alexsmobs:* covers melee, arrows and spells of those mobs; mob:alexsmobs:* would cover melee only.

Hide all damage from a mod until a quest is done ​

json
{
  "rules": [
    { "match": "mekanism:*",   "unless": ["ftbquests:1A2B3C4D5E6F7081"], "then": { "ignore": true } },
    { "match": "*@mekanism:*", "unless": ["ftbquests:1A2B3C4D5E6F7081"], "then": { "ignore": true } }
  ]
}

The first rule takes the damage ids the mod registered, the second every hit by its mobs (they may use vanilla ids like minecraft:arrow). There is no mod: condition.

A catch-all tip below the special ones ​

json
{
  "rules": [
    { "match": "minecraft:arrow @minecraft:skeleton", "then": { "hint": "Skeletons keep their distance: close in behind a shield." } },
    { "match": "mob:*", "then": { "hint": "{attacker_name} hit you in melee." } },
    { "match": "*", "then": { "hint": "Open /whm to see everything that hit you." } }
  ]
}

Rules are read from the top, so * goes last.

Settings and locks ​

Always show tips and the mod name, never let players post coordinates ​

json
{
  "settings": {
    "showHints": { "value": true, "locked": true },
    "showSourceModName": { "value": true, "locked": true },
    "includeCoordsInCopy": { "value": false, "locked": true }
  }
}

Same look for everyone ​

json
{
  "locks": { "personal": ["renames", "hints", "templates"], "templates": ["summary", "copy"] }
}

Armor details and /whm stats unlock with progress ​

json
{
  "settings": {
    "showMitigationDetails": {
      "if": ["advancement:minecraft:story/obtain_armor"], "value": true,
      "else": { "value": false, "locked": true },
      "message": "&aArmor details unlocked: hover a hit to see what your armor blocked."
    },
    "command.stats": { "if": ["advancement:minecraft:story/mine_stone"], "value": "all", "else": { "value": "none" }, "message": "&a/whm stats unlocked" }
  }
}

No distance or owner anywhere ​

json
{ "disabledVariables": ["attacker_distance", "attacker_owner"] }

Triggers ​

Consolation bread after the first creeper death ​

json
{
  "rules": [
    { "match": "mob:minecraft:creeper", "then": { "triggers": { "commands": ["give {player} minecraft:bread 4"], "oncePerPlayer": true } } }
  ]
}

Count deaths per cause in scoreboards ​

Only one set of triggers runs per death, so put the special rule first:

json
{
  "rules": [
    { "match": "minecraft:lava", "then": { "triggers": { "commands": ["scoreboard players add {player} deaths_lava 1"] } } },
    { "match": "mob:*", "then": { "triggers": { "commands": ["scoreboard players add {player} deaths_mob 1"] } } }
  ]
}

Server announcement with the killer's name ​

json
{
  "rules": [
    { "match": "@twilightforest:*", "then": { "triggers": { "commands": ["say {player} fell to {attacker_name} ({damage} HP hit)"], "cooldownSeconds": 30 } } }
  ]
}

Templates ​

Minimal respawn summary ​

json
{
  "templates": {
    "summary": [
      "&c☠ {killing_blow} &7({damage} ❤ / {total} ❤ in {total_seconds}s)",
      "&a✎ {tip}",
      "&b{recap_link}"
    ]
  }
}

Compact panel lines with % of max health ​

json
{
  "templates": {
    "line": ["&4{killing}&8{time_ago} &f{name} &c-{damage} ❤ &7{max_hp_percent|?}% &e{badges}"]
  }
}

Short hover text ​

json
{
  "templates": {
    "hover": [
      "&l{name}",
      "&c{damage} ❤ &7(before armor {raw_damage} ❤, {mitigation}% blocked)",
      "&f{attacker_name} &7{weapon}",
      "&9{damage_mod}",
      "&a{tip}"
    ]
  }
}

Discord-friendly copy text ​

json
{
  "templates": {
    "copy": [
      "**{player} died** at {time} in {dimension}",
      "> {death_message}",
      "```",
      "{timeline}",
      "```",
      "Last {total_seconds}s: {total} hearts in {total_hits} hits",
      "{equipment}"
    ]
  },
  "locks": { "templates": ["copy"] }
}

Death messages ​

json
{
  "rules": [
    { "match": "*@twilightforest:lich", "then": { "deathMessage": "{player} was outsmarted by the Lich" } },
    { "match": "minecraft:lava @dim:minecraft:the_nether", "then": { "deathMessage": "{player} took a bath in Nether lava" } },
    { "match": "mob:minecraft:zombie @item:*sword*", "then": { "deathMessage": "{player} was cut down by {attacker_name} wielding {weapon|a blade}" } }
  ]
}

On Forge / NeoForge servers, only players with the mod see these. See the support matrix.

Progress ​

??? until the boss quest is done (FTB Quests) ​

json
{
  "rules": [
    {
      "match": "*@twilightforest:lich",
      "if": ["ftbquests:1A2B3C4D5E6F7081"],
      "then": { "name": "&dThe Lich", "hint": "Hit the shields first." },
      "else": { "name": "&k???", "hide": ["damage_id", "attacker", "mod", "weapon", "death_message", "tip"] }
    }
  ]
}

Replace 1A2B3C4D5E6F7081 with the id of your boss quest. On Forge / NeoForge, also set requireClientMod=true so nobody sees the killer in the vanilla death message.

Hide a whole dimension until it is unlocked (Game Stages) ​

json
{
  "rules": [
    {
      "match": "* @dim:mypack:the_abyss",
      "unless": ["stage:abyss"],
      "then": {
        "name": "Something in the dark",
        "hint": "You are not ready for this place yet.",
        "hide": ["attacker", "mod", "weapon", "environment", "position", "death_message"]
      }
    }
  ]
}

Better tips after a few deaths (score) ​

Count deaths with a vanilla objective (/scoreboard objectives add deaths deathCount), then:

json
{
  "rules": [
    { "match": "minecraft:lava", "if": ["score:deaths>=3"],
      "then": { "hint": "&eStill dying in lava? Carry a water bucket and Fire Resistance!" } }
  ]
}

Without an else, the normal tip shows until the third death.

Reveal after an advancement, with a message on the first death before it ​

json
{
  "rules": [
    {
      "match": "*@minecraft:warden",
      "if": ["advancement:minecraft:adventure/avoid_vibration"],
      "then": { "name": "&8The Warden", "hint": "Sneak. It hears everything." },
      "else": {
        "name": "&8The Thing Below",
        "hide": ["attacker", "mod"],
        "triggers": { "commands": ["tellraw {player} {\"text\":\"You met something terrible. Sneak next time.\",\"color\":\"dark_gray\"}"], "oncePerPlayer": true }
      }
    }
  ]
}

A trigger only for new players ​

json
{
  "rules": [
    { "match": "*", "unless": ["tag:veteran"],
      "then": { "triggers": { "commands": ["give {player} minecraft:cooked_beef 8"], "cooldownSeconds": 600 } } }
  ]
}

Put it at the end of the list: a rule further up that has triggers runs instead of this one.

Made by junjun1z. The mods are MIT licensed.