Skip to content

レシピ集 ​

そのまま使える pack ファイルです。それぞれ config/whathitme/pack/ に入れ(ファイル名は .json で終われば自由)、/whm reload を実行して、/whm test かパックエディターのプレビューで確認してください。

ダメージ ID はバージョンで違う

例ではよく使うバニラの ID を使っています。Minecraft のバージョンによって名前が違うものがあります(1.19.4 より前は minecraft:outOfWorld、以降は minecraft:out_of_world)。/whm search かパックエディターのダメージ ID の選択で確認してください。

名前とヒント ​

バニラのダメージにわかりやすい名前を付ける ​

json
{
  "rules": [
    { "match": "minecraft:outOfWorld", "then": { "name": "&5奈落" } },
    { "match": "minecraft:inWall", "then": { "name": "窒息" } },
    { "match": "minecraft:cramming", "then": { "name": "エンティティの詰め込みすぎ" } },
    { "match": "minecraft:flyIntoWall", "then": { "name": "運動エネルギー" } }
  ]
}

mod 全体に 1 つのヒント、ボスにはもっと良いヒント ​

ヒントを設定する上から最初のルールが勝つので、特別なルールを先に置きます:

json
{
  "rules": [
    { "match": "twilightforest:lich_bolt @twilightforest:lich", "then": { "hint": "リッチの弾は剣を振って跳ね返せる!" } },
    { "match": "@twilightforest:lich", "then": { "hint": "まずリッチの盾を壊し、それから本体を攻撃しよう。" } },
    { "match": "@twilightforest:*", "then": { "hint": "黄昏の森の mob は強い。オーバーワールドより良い防具を持っていこう。" } }
  ]
}

ディメンションごとのヒント ​

json
{
  "rules": [
    { "match": "minecraft:lava @dim:minecraft:the_nether", "then": { "hint": "ネザーでは耐火のポーションを持ち歩こう。" } },
    { "match": "minecraft:fall @dim:minecraft:the_end", "then": { "hint": "ジ・エンドには低速落下か水バケツを持っていこう。" } },
    { "match": "* @dim:mypack:deep_dark_dimension", "then": { "hint": "ここに公平なものはない。仲間を連れてこよう。" } }
  ]
}

武器を持った mob に別の名前 ​

json
{
  "rules": [
    { "match": "mob:minecraft:zombie @item:*diamond*", "then": { "name": "&b装備の整ったゾンビ" } },
    { "match": "mob:minecraft:zombie @item:minecraft:iron_sword", "then": { "name": "武装ゾンビ" } },
    { "match": "minecraft:arrow @minecraft:skeleton", "then": { "name": "スケルトンの狙撃" } }
  ]
}

翻訳したヒント ​

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

あとはリソースパックの assets/mypack/lang/en_us.json、ja_jp.json などに "mypack.hint.lava": "..." を書きます。

邪魔な記録を隠す ​

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

ワイルドカード ​

mod 全体に 1 つのルール。すべての書き方、キービルダーのボタン、注意点はワイルドカードを参照。

ある mod の mob すべてに名前を付ける ​

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

*@alexsmobs:* はその mob の近接・矢・魔法をまとめて含みます。mob:alexsmobs:* なら近接だけです。

クエストを終えるまで、ある mod のダメージをすべて隠す ​

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

1 つ目のルールはその mod が登録したダメージ ID、2 つ目はその mob によるすべての攻撃(minecraft:arrow のようなバニラの ID のこともある)です。mod: という条件はありません。

特別なルールの下に受け皿のヒント ​

json
{
  "rules": [
    { "match": "minecraft:arrow @minecraft:skeleton", "then": { "hint": "スケルトンは距離を取る。盾を構えて近づこう。" } },
    { "match": "mob:*", "then": { "hint": "{attacker_name} の近接攻撃を受けました。" } },
    { "match": "*", "then": { "hint": "/whm で受けた攻撃をすべて確認できます。" } }
  ]
}

ルールは上から読まれるので、* は最後に置きます。

設定とロック ​

ヒントと mod 名を常に表示し、座標は貼らせない ​

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

全員に同じ見た目 ​

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

防具の詳細と /whm stats を進行度で解放 ​

json
{
  "settings": {
    "showMitigationDetails": {
      "if": ["advancement:minecraft:story/obtain_armor"], "value": true,
      "else": { "value": false, "locked": true },
      "message": "&a防具の詳細が解放された:攻撃にカーソルを合わせると防具が防いだ分が見える。"
    },
    "command.stats": { "if": ["advancement:minecraft:story/mine_stone"], "value": "all", "else": { "value": "none" }, "message": "&a/whm stats が使えるようになった" }
  }
}

距離と持ち主をどこにも出さない ​

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

トリガー ​

最初にクリーパーで死んだときのなぐさめのパン ​

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

原因ごとの死亡をスコアボードで数える ​

1 回の死亡で実行されるトリガーは 1 組だけなので、特別なルールを先に置きます:

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"] } } }
  ]
}

倒した相手の名前付きでサーバーに告知 ​

json
{
  "rules": [
    { "match": "@twilightforest:*", "then": { "triggers": { "commands": ["say {player} は {attacker_name} に倒された({damage} HP の一撃)"], "cooldownSeconds": 30 } } }
  ]
}

テンプレート ​

短いリスポーン後の要約 ​

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

最大体力の % 付きのコンパクトなパネルの行 ​

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

短い詳細表示 ​

json
{
  "templates": {
    "hover": [
      "&l{name}",
      "&c{damage} ❤ &7(防具の前 {raw_damage} ❤、{mitigation}% 軽減)",
      "&f{attacker_name} &7{weapon}",
      "&9{damage_mod}",
      "&a{tip}"
    ]
  }
}

Discord に貼りやすいコピー文 ​

json
{
  "templates": {
    "copy": [
      "**{player} が死亡** {time}、{dimension}",
      "> {death_message}",
      "```",
      "{timeline}",
      "```",
      "直近 {total_seconds} 秒:{total_hits} 回で {total} ハート",
      "{equipment}"
    ]
  },
  "locks": { "templates": ["copy"] }
}

死亡メッセージ ​

json
{
  "rules": [
    { "match": "*@twilightforest:lich", "then": { "deathMessage": "{player}はリッチに出し抜かれた" } },
    { "match": "minecraft:lava @dim:minecraft:the_nether", "then": { "deathMessage": "{player}はネザーの溶岩風呂に入った" } },
    { "match": "mob:minecraft:zombie @item:*sword*", "then": { "deathMessage": "{player}は{weapon|刃物}を持った{attacker_name}に斬られた" } }
  ]
}

Forge / NeoForge のサーバーでは、これが見えるのは mod を入れたプレイヤーだけです。対応表を参照してください。

進行度 ​

ボスのクエストを終えるまで ???(FTB Quests) ​

json
{
  "rules": [
    {
      "match": "*@twilightforest:lich",
      "if": ["ftbquests:1A2B3C4D5E6F7081"],
      "then": { "name": "&dリッチ", "hint": "まず盾を壊そう。" },
      "else": { "name": "&k???", "hide": ["damage_id", "attacker", "mod", "weapon", "death_message", "tip"] }
    }
  ]
}

1A2B3C4D5E6F7081 はボスのクエストの ID に置き換えてください。Forge / NeoForge では、バニラの死亡メッセージで攻撃者がわからないよう requireClientMod=true も設定してください。

解放されるまでディメンションごと隠す(Game Stages) ​

json
{
  "rules": [
    {
      "match": "* @dim:mypack:the_abyss",
      "unless": ["stage:abyss"],
      "then": {
        "name": "暗闇の中の何か",
        "hint": "まだこの場所に来る準備ができていない。",
        "hide": ["attacker", "mod", "weapon", "environment", "position", "death_message"]
      }
    }
  ]
}

何度か死ぬと良いヒントになる(スコア) ​

バニラの目的で死亡回数を数え(/scoreboard objectives add deaths deathCount)、次のように書きます:

json
{
  "rules": [
    { "match": "minecraft:lava", "if": ["score:deaths>=3"],
      "then": { "hint": "&eまだ溶岩で死んでる? 水バケツと耐火のポーションを持とう!" } }
  ]
}

else がないので、3 回目の死亡までは普段のヒントが出ます。

進捗で正体を明かし、その前の最初の死亡ではメッセージ ​

json
{
  "rules": [
    {
      "match": "*@minecraft:warden",
      "if": ["advancement:minecraft:adventure/avoid_vibration"],
      "then": { "name": "&8ウォーデン", "hint": "しゃがもう。何でも聞こえている。" },
      "else": {
        "name": "&8地下のなにか",
        "hide": ["attacker", "mod"],
        "triggers": { "commands": ["tellraw {player} {\"text\":\"恐ろしいものに出会った。次はしゃがもう。\",\"color\":\"dark_gray\"}"], "oncePerPlayer": true }
      }
    }
  ]
}

新しいプレイヤーだけのトリガー ​

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

リストの最後に置いてください。上にトリガーを持つルールがあると、そちらが代わりに実行されます。

Made by junjun1z。mod は MIT ライセンスです。