LoginSignup
1
0

Minecraft: Java Edition のアイテム コンポーネントまとめ

Last updated at Posted at 2024-04-16

アイテム コンポーネントの構文を JSON 風に整形して説明します。初歩的なことも説明します。ご了承ください。動作確認バージョンは 1.20.6 です。

途中で「true または false で指定します」と伝えるところがありますが、1b0b または 10 に置き換えても機能します。

わかりやすく説明するために、用語を次のように置き換えていることがあります。

{タグ: "値", リストのタグ: ["リストの値", "リストの値"]}
  • * 常に必要なタグです。
  • ** その階層があれば必要なタグです。

節リスト

  1. minecraft:attribute_modifiers
  2. minecraft:banner_patterns
  3. minecraft:base_color
  4. minecraft:bees
  5. minecraft:block_entity_data
  6. minecraft:block_state
  7. minecraft:bucket_entity_data
  8. minecraft:bundle_contents
  9. minecraft:can_break
  10. minecraft:can_place_on
  11. minecraft:charged_projectiles
  12. minecraft:container
  13. minecraft:container_loot
  14. minecraft:custom_data
  15. minecraft:custom_model_data
  16. minecraft:custom_name
  17. minecraft:damage
  18. minecraft:debug_stick_state
  19. minecraft:dyed_color
  20. minecraft:enchantment_glint_override
  21. minecraft:enchantments
  22. minecraft:entity_data
  23. minecraft:fire_resistant
  24. minecraft:firework_explosion
  25. minecraft:fireworks
  26. minecraft:food
  27. minecraft:hide_additional_tooltip
  28. minecraft:hide_tooltip
  29. minecraft:instrument
  30. minecraft:intangible_projectile
  31. minecraft:item_name
  32. minecraft:lock
  33. minecraft:lodestone_tracker
  34. minecraft:lore
  35. minecraft:map_color
  36. minecraft:map_decorations
  37. minecraft:map_id
  38. minecraft:max_damage
  39. minecraft:max_stack_size
  40. minecraft:note_block_sound
  41. minecraft:ominous_bottle_amplifier
  42. minecraft:pot_decorations
  43. minecraft:potion_contents
  44. minecraft:profile
  45. minecraft:rarity
  46. minecraft:recipes
  47. minecraft:repair_cost
  48. minecraft:stored_enchantments
  49. minecraft:suspicious_stew_effects
  50. minecraft:tool
  51. minecraft:trim
  52. minecraft:unbreakable
  53. minecraft:writable_book_content
  54. minecraft:written_book_content
  55. 余談: アイテム コンポーネントを NBT 構造(未整形 JSON 的な構造)で記述する
  56. 余談: NBT と JSON は同じではない
  57. 余談: Markdown のコード ブロックで NBT の色付け(シンタックス ハイライト)を行う
  58. 余談: NBT における半角スペースの必要性
  59. 参考

minecraft:attribute_modifiers

アイテムの属性を追加します。剣の攻撃力とか攻撃速度とか防具のノックバック耐性とかのあれです。すべてのアイテムに適用されます。

minecraft:apple[minecraft:attribute_modifiers= {show_in_tooltip: true, modifiers: [{amount: 2.5d, name: "attribute.attack_damage", slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; 0, 0, 0, 0], operation: "add_value"}]}]

JSON 風に整形:

minecraft:apple[
  minecraft:attribute_modifiers= {
    show_in_tooltip: true,
    modifiers: [
      {
        amount: 2.5d,
        name: "attribute.attack_damage",
        slot: "mainhand",
        type: "minecraft:generic.attack_damage",
        uuid: [I; 0, 0, 0, 0],
        operation: "add_value"
      }
    ]
  }
]
  • show_in_tooltip:
    属性をアイテムのツールチップに表示するかどうか。true または false で指定します。「利き手に持ったとき: 攻撃力 +4」とかのあれです。
  • modifiers: *
    リストで指定します。
    • amount: **
      属性の変化量。倍精度浮動小数点数で指定します。数字の後の d は必要ではありません。
    • name: **
      属性の名前。任意の文字列を指定します。
    • slot:
      属性の影響を受けるスロット。文字列で指定します。
      • "mainhand" は利き手。
      • "offhand" はオフハンド。
      • "hand" は利き手とオフハンド。
      • "head" は頭。
      • "chest" は胴体。
      • "legs" は脚。
      • "feet" は足。
      • "armor" は頭、胴体、脚、足。
      • "any" と指定した場合、または slot タグを使用しなかった場合は、利き手オフハンド胴体のすべてのスロットで影響を受けます。
    • type: **
      追加する属性 1 個。属性 ID を文字列で指定します。例えば、"minecraft:generic.armor" は防御力、"minecraft:generic.attack_damage" は攻撃力です。
    • uuid: **
      属性の UUID。整数のリストで指定します。本当は [I; 0, 0, 0, 0] ではなく [I; 973795650, 936461337, -1390631167, 1930233224] みたいな感じで指定されます。特に決まったルールはなく、任意の整数を指定します。属性の識別番号的なものなので、違う属性ごとに違う UUID を指定しないといけません。
    • operation: **
      属性の計算方法。文字列で指定します。知識に自身がないですが、説明するとこうなります。
      • "add_value" は、基本値または値に amount タグで指定した値が加算されます。
        • 例えば、エンティティの属性の基本値が 2.0 で、{amount: 4.0d, operation: "add_value"} の属性が適用されると、2 + 4 で 6 になります。(属性の基本値 + amount
      • "add_multiplied_base" または "add_multiplied_total" は、基本値に amount タグで指定した値が乗算されます。違いは次のとおりです。
        • 1. 例えば、エンティティの属性の基本値が 2.0 で、{amount: 4.0d} の属性が適用されると、2 + (2 × 4) で 10 になります。ここまでは "add_multiplied_base""add_multiplied_total" も同じ結果です。
        • 2. 1 の結果と、さらに {amount: 4.0d, operation: "add_multiplied_base"} の属性が適用されると、10 + (2 × 4) で 18 になります。(属性の基本値 × amount
        • 3. 1 の結果と、さらに {amount: 4.0d, operation: "add_multiplied_total"} の属性が適用されると、10 + (10 × 4) で 50 になります。(1 の結果 × amount

複数の属性を追加したい場合は、次のようになります。

minecraft:apple[minecraft:attribute_modifiers= {show_in_tooltip: true, modifiers: [{amount: 2.5d, name: "attribute.attack_damage", slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; 0, 0, 0, 0], operation: "add_value"}, {amount: -0.8d, name: "attribute.attack_speed", slot: "offhand", type: "minecraft:generic.attack_speed", uuid: [I; 0, 0, 0, 1], operation: "add_multiplied_base"}]}]

JSON 風に整形:

minecraft:apple[
  minecraft:attribute_modifiers= {
    show_in_tooltip: true,
    modifiers: [
      {
        amount: 2.5d,
        name: "attribute.attack_damage",
        slot: "mainhand",
        type: "minecraft:generic.attack_damage",
        uuid: [I; 0, 0, 0, 0],
        operation: "add_value"
      },
      {
        amount: -0.8d,
        name: "attribute.attack_speed",
        slot: "offhand",
        type: "minecraft:generic.attack_speed",
        uuid: [I; 0, 0, 0, 1],
        operation: "add_multiplied_base"
      }
    ]
  }
]

UUID は違う属性ごとに違う UUID を指定しないといけません。

節リストへ戻る

minecraft:banner_patterns

旗の模様を指定します。旗と盾に適用されます。盾の場合は、minecraft:base_color コンポーネント(1 個下の節)も指定することを推奨します。

minecraft:red_banner[minecraft:banner_patterns= [{color: "white", pattern: "minecraft:mojang"}]]

JSON 風に整形:

minecraft:red_banner[
  minecraft:banner_patterns= [
    {
      color: "white",
      pattern: "minecraft:mojang"
    }
  ]
]

リストで指定します。

  • color: *
    模様の色。文字列で指定します。
    • "black" は黒色。
    • "blue" は青色。
    • "brown" は茶色。
    • "cyan" は青緑色。
    • "gray" は灰色。
    • "green" は緑色。
    • "light_blue" は空色。
    • "light_gray" は薄灰色。
    • "lime" は黄緑色。
    • "magenta" は赤紫色。
    • "orange" は橙色。
    • "pink" は桃色。
    • "purple" は紫色。
    • "red" は赤色。
    • "white" は白色。
    • "yellow" は黄色。
  • pattern: *
    模様の種類 1 個。模様 ID を文字列で指定します。例えば、"minecraft:stripe_bottom" は下端の横帯、"minecraft:mojang" は何かの模様です。

複数の模様を指定したい場合は、次のようになります。

minecraft:magenta_banner[minecraft:banner_patterns= [{color: "black", pattern: "minecraft:triangle_top"}, {color: "black", pattern: "minecraft:triangle_bottom"}]]

JSON 風に整形:

minecraft:magenta_banner[
  minecraft:banner_patterns= [
    {
      color: "black",
      pattern: "minecraft:triangle_top"
    },
    {
      color: "black",
      pattern: "minecraft:triangle_bottom"
    }
  ]
]

節リストへ戻る

minecraft:base_color

盾に適用される模様の下地の色を指定します。盾にのみ適用されます。

minecraft:shield[minecraft:base_color= "white"]

文字列で指定します。

  • "black" は黒色。
  • "blue" は青色。
  • "brown" は茶色。
  • "cyan" は青緑色。
  • "gray" は灰色。
  • "green" は緑色。
  • "light_blue" は空色。
  • "light_gray" は薄灰色。
  • "lime" は黄緑色。
  • "magenta" は赤紫色。
  • "orange" は橙色。
  • "pink" は桃色。
  • "purple" は紫色。
  • "red" は赤色。
  • "white" は白色。
  • "yellow" は黄色。

次のように、minecraft:banner_patterns コンポーネント(1 個上の節)と組み合わせることが多いです。

minecraft:shield[minecraft:base_color= "red", minecraft:banner_patterns= [{color: "white", pattern: "minecraft:mojang"}]]

JSON 風に整形:

minecraft:shield[
  minecraft:base_color= "red",
  minecraft:banner_patterns= [
    {
      color: "white",
      pattern: "minecraft:mojang"
    }
  ]
]

節リストへ戻る

minecraft:bees

ミツバチの巣または養蜂箱に停滞しているエンティティの NBT データを指定します。ミツバチの巣と養蜂箱に適用されます。

minecraft:bee_nest[minecraft:bees= [{ticks_in_hive: 0, entity_data: {id: "minecraft:bee"}, min_ticks_in_hive: 2400}]]

JSON 風に整形:

minecraft:bee_nest[
  minecraft:bees= [
    {
      ticks_in_hive: 0,
      entity_data: {
        id: "minecraft:bee"
      },
      min_ticks_in_hive: 2400
    }
  ]
]

リストで指定します。

  • ticks_in_hive: *
    エンティティがミツバチの巣または養蜂箱の中に停滞した経過ティック数。整数で指定します。1 秒 = 20 です。
  • entity_data:
    ミツバチの巣または養蜂箱の中に停滞しているエンティティの NBT データ
  • min_ticks_in_hive: *
    エンティティがミツバチの巣または養蜂箱の中に停滞する最小ティック数。整数で指定します。1 秒 = 20 です。

複数のエンティティを指定したい場合は、次のようになります。

minecraft:beehive[minecraft:bees= [{ticks_in_hive: 0, entity_data: {id: "minecraft:bee"}, min_ticks_in_hive: 2400}, {ticks_in_hive: 2380, entity_data: {Health: 0.0f, id: "minecraft:bee"}, min_ticks_in_hive: 2400}]]

JSON 風に整形:

minecraft:beehive[
  minecraft:bees= [
    {
      ticks_in_hive: 0,
      entity_data: {
        id: "minecraft:bee"
      },
      min_ticks_in_hive: 2400
    },
    {
      ticks_in_hive: 2380,
      entity_data: {
        Health: 0.0f,
        id: "minecraft:bee"
      },
      min_ticks_in_hive: 2400
    }
  ]
]

節リストへ戻る

minecraft:block_entity_data

ブロックが設置されるときに適用されるブロック エンティティの NBT データを指定します。ブロック エンティティにのみ適用されます。

minecraft:oak_sign[minecraft:block_entity_data= {id: "minecraft:sign", front_text: {messages: ['"Hello, world!"', '""', '""', '""']}}]

JSON 風に整形:

minecraft:oak_sign[
  minecraft:block_entity_data= {
    id: "minecraft:sign",
    front_text: {
      messages: [
        '"Hello, world!"',
        '""',
        '""',
        '""'
      ]
    }
  }
]

ブロック エンティティ形式で指定します。この例では、看板に「Hello, world!」が記述されることを指定しています。

節リストへ戻る

minecraft:block_state

ブロックが設置されるときに適用されるブロック状態プロパティを指定します。デバッグ棒でいろいろ変更できるあれです。ブロック状態プロパティを持っているブロックにのみ適用されます。

minecraft:light[minecraft:block_state= {level: "2"}]

節リストへ戻る

minecraft:bucket_entity_data

水入りバケツの中に停滞しているエンティティの NBT データを指定します。エンティティ入りバケツにのみ適用されます。

minecraft:axolotl_bucket[minecraft:bucket_entity_data= {NoGravity: true, Variant: 4, Health: 0.0f, Silent: false, HuntingCooldown: 0, Invulnerable: false, Glowing: true, NoAI: true, Age: 0}]

JSON 風に整形:

minecraft:axolotl_bucket[
  minecraft:bucket_entity_data= {
    NoGravity: true,
    Variant: 4,
    Health: 0.0f,
    Silent: false,
    HuntingCooldown: 2400L,
    Invulnerable: false,
    Glowing: true,
    NoAI: true,
    Age: 0
  }
]

エンティティの NBT データから次のタグが指定できます。

  • NoGravity:
    エンティティが空中に停滞するかどうか。true または false で指定します。
  • Variant:
    ウーパールーパーの異変体。整数で指定します。ウーパールーパーの Variant タグと一緒です。
  • BucketVariantTag:
    熱帯魚の異変体。整数で指定します。熱帯魚の Variant タグと一緒です。この例では指定していません。
  • Health:
    エンティティの体力。浮動小数点数で指定します。数字の後の f は必要ではありません。ハート 1 個 = 2.0f です。
  • Silent:
    エンティティの音声を再生しないかどうか。true または false で指定します。
  • HuntingCooldown:
    ウーパールーパーが敵対 Mob ではない Mob を倒せるようになるまでのティック数。64 ビット整数で指定します。数字の後の L は必要ではありません。1 秒 = 20L です。ウーパールーパーの Brain.memories."minecraft:has_hunting_cooldown".ttl タグと一緒です。
  • Invulnerable:
    エンティティがダメージを受けなくなるかどうか。true または false で指定します。
  • Glowing:
    エンティティの縁が発光するかどうか。true または false で指定します。
  • NoAI:
    エンティティの AI を無効にするかどうか。true または false で指定します。
  • Age:
    ウーパールーパーが大人になるまでのティック数、またはウーパールーパーが繁殖できるようになるまでのティック数。整数で指定します。1 秒 = 20 です。ウーパールーパーの Age タグと一緒です。

節リストへ戻る

minecraft:bundle_contents

バンドルに収納されているアイテムを指定します。バンドルにのみ適用されます。

minecraft:bundle[minecraft:bundle_contents= [{count: 2, id: "minecraft:apple"}, {components: {"minecraft:bundle_contents": [{count: 2, id: "minecraft:golden_apple"}]}, count: 1, id: "minecraft:bundle"}]]

JSON 風に整形:

minecraft:bundle[
  minecraft:bundle_contents= [
    {
      count: 2,
      id: "minecraft:apple"
    },
    {
      components: {
        "minecraft:bundle_contents": [
          {
            count: 2,
            id: "minecraft:golden_apple"
          }
        ]
      },
      count: 1,
      id: "minecraft:bundle"
    }
  ]
]

リストで指定します。

  • components:
    アイテムのコンポーネント。この例ではバンドルの中にバンドルを収納しています。
  • count:
    アイテムのスタック個数。整数で指定します。
  • id: **
    アイテム。アイテム ID を文字列で指定します。

簡易的に記述すると次のようになります。

minecraft:bundle[minecraft:bundle_contents= [{count: 2, id: "minecraft:apple"}, {count: 1, id: "minecraft:golden_apple"}]]

JSON 風に整形:

minecraft:bundle[
  minecraft:bundle_contents= [
    {
      count: 2,
      id: "minecraft:apple"
    },
    {
      count: 1,
      id: "minecraft:golden_apple"
    }
  ]
]

節リストへ戻る

minecraft:can_break

アドベンチャー モードで破壊できるブロックを指定します。「破壊可能: 草ブロック」とかのあれです。すべてのアイテムに適用されます。

minecraft:apple[minecraft:can_break= {predicates: [{nbt: "{front_text: {messages: ['\"Hello, world!\"', '\"\"', '\"\"', '\"\"']}, id: \"minecraft:sign\"}", blocks: "#minecraft:standing_signs"}, {blocks: ["minecraft:oak_slab", "minecraft:birch_slab"], state: {type: "bottom"}}], show_in_tooltip: true}]

JSON 風に整形:

minecraft:apple[
  minecraft:can_break= {
    predicates: [
      {
        nbt: "{front_text: {messages: ['\"Hello, world!\"', '\"\"', '\"\"', '\"\"']}, id: \"minecraft:sign\"}",
        blocks: "#minecraft:standing_signs"
      },
      {
        blocks: [
          "minecraft:oak_slab",
          "minecraft:birch_slab"
        ],
        state: {
          type: "bottom"
        }
      }
    ],
    show_in_tooltip: true
  }
]
  • predicates:
    リストで指定します。
    • nbt:
      ブロック エンティティの NBT データ。ブロック エンティティ形式を文字列で指定します。この例では、「Hello, world!」と記述された看板を指定しています。ワールドに参加し直さないと、機能しないことがあります。
    • blocks:
      ブロック。ブロック ID を文字列または文字列のリストで指定、または # を含めたブロック タグを文字列で指定します。ブロック ID は文字列のリストで複数の項目を指定できますが、ブロック タグは 1 個の項目しか指定できません
    • state:
      ブロック状態プロパティ。デバッグ棒でいろいろ変更できるあれです。この例では、下向きに設置されたハーフ ブロックを指定しています。
  • show_in_tooltip:
    破壊できるブロックをアイテムのツールチップに表示するかどうか。true または false で指定します。「破壊可能: 草ブロック」とかのあれです。

簡易的に記述すると次のようになります。

minecraft:apple[minecraft:can_break= {predicates: [{blocks: ["minecraft:grass_block", "minecraft:dirt", "minecraft:coarse_dirt"]}]}]

JSON 風に整形:

minecraft:apple[
  minecraft:can_break= {
    predicates: [
      {
        blocks: [
          "minecraft:grass_block",
          "minecraft:dirt",
          "minecraft:coarse_dirt"
        ]
      }
    ]
  }
]

節リストへ戻る

minecraft:can_place_on

アドベンチャー モードで設置できるブロックの対象を指定します。「設置可能: 草ブロック」とかのあれです。設置できるアイテムにのみ適用されます。

minecraft:white_banner[minecraft:can_place_on= {predicates: [{nbt: "{front_text: {messages: ['\"Hello, world!\"', '\"\"', '\"\"', '\"\"']}, id: \"minecraft:sign\"}", blocks: "#minecraft:standing_signs"}, {blocks: ["minecraft:oak_slab", "minecraft:birch_slab"], state: {type: "bottom"}}], show_in_tooltip: true}]

JSON 風に整形:

minecraft:white_banner[
  minecraft:can_place_on= {
    predicates: [
      {
        nbt: "{front_text: {messages: ['\"Hello, world!\"', '\"\"', '\"\"', '\"\"']}, id: \"minecraft:sign\"}",
        blocks: "#minecraft:standing_signs"
      },
      {
        blocks: [
          "minecraft:oak_slab",
          "minecraft:birch_slab"
        ],
        state: {
          type: "bottom"
        }
      }
    ],
    show_in_tooltip: true
  }
]
  • predicates:
    リストで指定します。
    • nbt:
      ブロック エンティティの NBT データ。ブロック エンティティ形式を文字列で指定します。この例では、「Hello, world!」と記述された看板を指定しています。ワールドに参加し直さないと、機能しないことがあります。
    • blocks:
      ブロック。ブロック ID を文字列または文字列のリストで指定、または # を含めたブロック タグを文字列で指定します。ブロック ID は文字列のリストで複数の項目を指定できますが、ブロック タグは 1 個の項目しか指定できません
    • state:
      ブロック状態プロパティ。デバッグ棒でいろいろ変更できるあれです。この例では、下向きに設置されたハーフ ブロックを指定しています。
  • show_in_tooltip:
    設置できるブロックの対象をアイテムのツールチップに表示するかどうか。true または false で指定します。「設置可能: 草ブロック」とかのあれです。

簡易的に記述すると次のようになります。

minecraft:white_banner[minecraft:can_place_on= {predicates: [{blocks: ["minecraft:grass_block", "minecraft:dirt", "minecraft:coarse_dirt"]}]}]

JSON 風に整形:

minecraft:white_banner[
  minecraft:can_place_on= {
    predicates: [
      {
        blocks: [
          "minecraft:grass_block",
          "minecraft:dirt",
          "minecraft:coarse_dirt"
        ]
      }
    ]
  }
]

節リストへ戻る

minecraft:charged_projectiles

クロスボウに装填されている飛び道具を指定します。クロスボウにのみ適用されます。

minecraft:crossbow[minecraft:charged_projectiles= [{count: 1, id: "minecraft:arrow"}, {components: {"minecraft:fireworks": {explosions: [{shape: "small_ball"}]}}, count: 1, id: "minecraft:firework_rocket"}]]

JSON 風に整形:

minecraft:crossbow[
  minecraft:charged_projectiles= [
    {
      count: 1,
      id: "minecraft:arrow"
    },
    {
      components: {
        "minecraft:fireworks": {
          explosions: [
            {
              shape: "small_ball"
            }
          ]
        }
      },
      count: 1,
      id: "minecraft:firework_rocket"
    }
  ]
]

リストで指定します。

  • components:
    アイテムのコンポーネント。この例ではロケット花火の爆発方法を指定しています。
  • count:
    アイテムのスタック個数。整数で指定します。
  • id: **
    アイテム。アイテム ID を文字列で指定します。

拡散のエンチャントが付いたクロスボウを次のように再現できます。

minecraft:crossbow[minecraft:charged_projectiles= [{count: 1, id: "minecraft:arrow"}, {count: 1, id: "minecraft:arrow"}, {count: 1, id: "minecraft:arrow"}]]

JSON 風に整形:

minecraft:crossbow[
  minecraft:charged_projectiles= [
    {
      count: 1,
      id: "minecraft:arrow"
    },
    {
      count: 1,
      id: "minecraft:arrow"
    },
    {
      count: 1,
      id: "minecraft:arrow"
    }
  ]
]

節リストへ戻る

minecraft:container

コンテナーを含むブロックの中のアイテムを指定します。コンテナーを含むブロックにのみ適用されます。

minecraft:chest[minecraft:container= [{item: {count: 1, id: "minecraft:apple"}, slot: 0}, {item: {components: {"minecraft:base_color": "white"}, count: 1, id: "minecraft:shield"}, slot: 1}]]

JSON 風に整形:

minecraft:chest[
  minecraft:container= [
    {
      item: {
        count: 1,
        id: "minecraft:apple"
      },
      slot: 0
    },
    {
      item: {
        components: {
          "minecraft:base_color": "white"
        },
        count: 1,
        id: "minecraft:shield"
      },
      slot: 1
    }
  ]
]
  • item: **
    • components:
      アイテムのコンポーネント。
    • count:
      アイテムのスタック個数。整数で指定します。
    • id: **
      アイテム。アイテム ID を文字列で指定します。
  • slot: **
    アイテムが含まれるスロット。整数で指定します。

簡易的に記述すると次のようになります。

minecraft:chest[minecraft:container= [{item: {count: 2, id: "minecraft:apple"}, slot: 0}, {item: {count: 1, id: "minecraft:golden_apple"}, slot: 1}]]

JSON 風に整形:

minecraft:chest[
  minecraft:container= [
    {
      item: {
        count: 2,
        id: "minecraft:apple"
      },
      slot: 0
    },
    {
      item: {
        count: 1,
        id: "minecraft:golden_apple"
      },
      slot: 1
    }
  ]
]

節リストへ戻る

minecraft:container_loot

コンテナーを含むブロックの中のルート テーブルを指定します。コンテナーを含むブロックにのみ適用されます。

minecraft:chest[minecraft:container_loot= {loot_table: "minecraft:chests/spawn_bonus_chest", seed: 0L}]

JSON 風に整形:

minecraft:chest[
  minecraft:container_loot= {
    loot_table: "minecraft:chests/spawn_bonus_chest",
    seed: 0L
  }
]
  • loot_table: *
    ルート テーブルの種類。ルート テーブル ID を文字列で指定します。廃坑のチェストとか村のチェストとかの中身の種類を指定します。この例ではボーナス チェストの中身の種類を指定しています。
  • seed:
    ルート テーブルのシード値。64 ビット整数で指定します。数字の後の L は必要ではありません。同じ値が指定されると、まったく同じルート テーブルの中身が生成されます。0L と指定した場合、または seed タグを使用しなかった場合は、ランダムなルート テーブルの中身が生成されます。

節リストへ戻る

minecraft:custom_data

ゲームでは使用されない、任意のデータを指定します。コマンド利用者向け。すべてのアイテムに適用されます。

minecraft:apple[minecraft:custom_data= {hello_world: true}]

節リストへ戻る

minecraft:custom_model_data

カスタム モデル データの番号を指定します。番号によってテクスチャが変わるみたいなあれです。リソース パックを使わないのであれば無縁です。すべてのアイテムに適用されます。

minecraft:apple[minecraft:custom_model_data= 1]

整数で指定します。

節リストへ戻る

minecraft:custom_name

アイテムの名前を指定します。金床で名前を変更できるあれです。minecraft:item_name コンポーネントとの違いは、minecraft:item_name の節で説明します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:custom_name= '{fallback: "Diamond", italic: false, translate: "item.minecraft.diamond", type: "translatable"}']

未整形 JSON テキスト形式で指定しますが、次のようにシンプルに記述することもできます。

minecraft:apple[minecraft:custom_name= '"Hello, world!"']

節リストへ戻る

minecraft:damage

最大耐久値からどれくらいの耐久値を消費しているかを指定します。耐久値を所有するアイテムにのみ適用されます。

minecraft:diamond_pickaxe[minecraft:damage= 1]

整数で指定します。

節リストへ戻る

minecraft:debug_stick_state

デバッグ棒が選択したブロック状態プロパティを指定します。デバッグ棒にのみ適用されます。

minecraft:debug_stick[minecraft:debug_stick_state= {"minecraft:chest": "facing", "minecraft:oak_trapdoor": "facing"}]

JSON 風に整形:

minecraft:debug_stick[
  minecraft:debug_stick_state= {
    "minecraft:chest": "facing",
    "minecraft:oak_trapdoor": "facing"
  }
]

節リストへ戻る

minecraft:dyed_color

染色できるアイテムが染められている色を指定します。染色できるアイテムにのみ適用されます。

minecraft:leather_helmet[minecraft:dyed_color= {show_in_tooltip: true, rgb: 16777215}]

JSON 風に整形:

minecraft:leather_helmet[
  minecraft:dyed_color= {
    show_in_tooltip: true,
    rgb: 16777215
  }
]
  • show_in_tooltip:
    「染色済み」または染められた色をアイテムのツールチップに表示するかどうか。true または false で指定します。「色: #FFFFFF」とかのあれです。
  • rgb: *
    染められた色。整数で指定します。16 進数のカラー コードを 10 進数に変換した値を入力します。Minecraft Wiki の 10 進数のカラー コード計算機で計算することもできます。

節リストへ戻る

minecraft:enchantment_glint_override

アイテムにエンチャントのオーラを追加するかどうかを指定します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:enchantment_glint_override= true]

true または false で指定します。

すでにエンチャントのオーラが追加されているアイテムから除去することもできます。

minecraft:enchanted_book[minecraft:enchantment_glint_override= false]

節リストへ戻る

minecraft:enchantments

アイテムにエンチャントを追加します。すべてのアイテムに適用されます。

minecraft:diamond_chestplate[minecraft:enchantments= {show_in_tooltip: true, levels: {"minecraft:protection": 4}}]

JSON 風に整形:

minecraft:diamond_chestplate[
  minecraft:enchantments= {
    show_in_tooltip: true,
    levels: {
      "minecraft:protection": 4
    }
  }
]
  • show_in_tooltip:
    エンチャントをアイテムのツールチップに表示するかどうか。true または false で指定します。「ダメージ軽減 IV」とかのあれです。
  • levels:
    levels タグの中に、エンチャント ID のタグを入れます。そのタグの中では、エンチャントのレベルを整数で指定します。

複数のエンチャントを追加したい場合は、次のようになります。

minecraft:diamond_chestplate[minecraft:enchantments= {levels: {"minecraft:unbreaking": 3, "minecraft:protection": 4}}]

JSON 風に整形:

minecraft:diamond_chestplate[
  minecraft:enchantments= {
    levels: {
      "minecraft:unbreaking": 3,
      "minecraft:protection": 4
    }
  }
]

節リストへ戻る

minecraft:entity_data

アイテムから召喚されるエンティティの NBT データを指定します。エンティティを召喚できるアイテムにのみ適用されます。

minecraft:creeper_spawn_egg[minecraft:entity_data= {Health: 0.0f, id: "minecraft:creeper"}]

JSON 風に整形:

minecraft:creeper_spawn_egg[
  minecraft:entity_data= {
    Health: 0.0f,
    id: "minecraft:creeper"
  }
]

id タグが必要です。

id タグを変更すると、別のスポーン エッグから別のエンティティが召喚されるという奇妙な光景を見ることができます。

minecraft:chicken_spawn_egg[minecraft:entity_data= {id: "minecraft:creeper"}]

節リストへ戻る

minecraft:fire_resistant

アイテムが炎と溶岩で消滅しなくなるかどうかを指定します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:fire_resistant= {}]

中身はありません。このコンポーネントを使用した時点で適用されます。

節リストへ戻る

minecraft:firework_explosion

花火の星に保存される爆発エフェクトを指定します。花火の星にのみ適用されます。

minecraft:firework_star[minecraft:firework_explosion= {fade_colors: [I; 1973019, 4312372], has_trail: true, shape: "small_ball", colors: [I; 15790320, 11743532], has_twinkle: true}]

JSON 風に整形:

minecraft:firework_star[
  minecraft:firework_explosion= {
    fade_colors: [I; 1973019, 4312372],
    has_trail: true,
    shape: "small_ball",
    colors: [I; 15790320, 11743532],
    has_twinkle: true
  }
]
  • fade_colors:
    色変化。整数のリストで指定します。整数には、16 進数のカラー コードを 10 進数に変換した値を入力します。Minecraft Wiki の 10 進数のカラー コード計算機で計算することもできます。
  • has_trail:
    流星を追加するかどうか。true または false で指定します。
  • shape: *
    爆発の形。文字列で指定します。
    • "small_ball" は小玉。
    • "large_ball" は大玉。
    • "star" は星形。
    • "creeper" はクリーパー型。
    • "burst" は破裂。
  • colors:
    爆発の色。整数のリストで指定します。整数には、16 進数のカラー コードを 10 進数に変換した値を入力します。Minecraft Wiki の 10 進数のカラー コード計算機で計算することもできます。
  • has_twinkle:
    点滅を追加するかどうか。true または false で指定します。

節リストへ戻る

minecraft:fireworks

ロケット花火の爆発エフェクトと飛翔時間を指定します。ロケット花火にのみ適用されます。

minecraft:firework_rocket[minecraft:fireworks= {explosions: [{fade_colors: [I; 1973019, 8073150], has_trail: true, shape: "small_ball", colors: [I; 15790320, 15435844], has_twinkle: true}, {fade_colors: [I; 15790320, 15435844], has_trail: false, shape: "large_ball", colors: [I; 1973019, 8073150], has_twinkle: false}], flight_duration: 1b}]

JSON 風に整形:

minecraft:firework_rocket[
  minecraft:fireworks= {
    explosions: [
      {
        fade_colors: [I; 1973019, 8073150],
        has_trail: true,
        shape: "small_ball",
        colors: [I; 15790320, 15435844],
        has_twinkle: true
      },
      {
        fade_colors: [I; 15790320, 15435844],
        has_trail: false,
        shape: "large_ball",
        colors: [I; 1973019, 8073150],
        has_twinkle: false
      }
    ],
    flight_duration: 1b
  }
]
  • explosions:
    リストで指定します。
    • fade_colors:
      色変化。整数のリストで指定します。整数には、16 進数のカラー コードを 10 進数に変換した値を入力します。Minecraft Wiki の 10 進数のカラー コード計算機で計算することもできます。
    • has_trail:
      流星を追加するかどうか。true または false で指定します。
    • shape: **
      爆発の形。文字列で指定します。
      • "small_ball" は小玉。
      • "large_ball" は大玉。
      • "star" は星形。
      • "creeper" はクリーパー型。
      • "burst" は破裂。
    • colors:
      爆発の色。整数のリストで指定します。整数には、16 進数のカラー コードを 10 進数に変換した値を入力します。Minecraft Wiki の 10 進数のカラー コード計算機で計算することもできます。
    • has_twinkle:
      点滅を追加するかどうか。true または false で指定します。
  • flight_duration:
    ロケット花火の飛翔時間。8 ビット整数で指定します。数字の後の b は必要ではありません。

節リストへ戻る

minecraft:food

食べ物の情報を指定します。食べられないアイテムを食べられるようにすることもできます。すべてのアイテムに適用されます。

minecraft:command_block[minecraft:food= {saturation: 20.0f, effects: [{probability: 1.0f, effect: {duration: 200, show_icon: true, amplifier: 2b, ambient: false, id: "minecraft:regeneration", show_particle: true}}, {probability: 0.1f, effect: {duration: 1, show_icon: true, amplifier: 124b, ambient: false, id: "minecraft:instant_damage", show_particle: true}}], nutrition: 20, can_always_eat: true, eat_seconds: 1.6f, using_converts_to: {components: {}, id: "minecraft:repeating_command_block"}}]

JSON 風に整形:

minecraft:command_block[
  minecraft:food= {
    saturation: 20.0f,
    effects: [
      {
        probability: 1.0f,
        effect: {
          duration: 200,
          show_icon: true,
          amplifier: 2b,
          ambient: false,
          id: "minecraft:regeneration",
          show_particle: true
        }
      },
      {
        probability: 0.1f,
        effect: {
          duration: 1,
          show_icon: true,
          amplifier: 124b,
          ambient: false,
          id: "minecraft:instant_damage",
          show_particle: true
        }
      }
    ],
    nutrition: 20,
    can_always_eat: true,
    eat_seconds: 1.6f,
    using_converts_to: {
      components: {},
      id: "minecraft:repeating_command_block"
    }
  }
]
  • saturation: *
    隠し満腹度の回復値。浮動小数点数で指定します。数字の後の f は必要ではありません。
  • effects:
    効果をリストで指定します。
    • probability:
      効果が付与される確率の割合。浮動小数点数で指定します。数字の後の f は必要ではありません。1% = 0.01f です。
    • effect: **
      • duration:
        効果の持続時間。整数で指定します。
      • show_icon:
        効果が付与されたときに、画面の右上に効果のアイコンを表示するかどうか。true または false で指定します。
      • amplifier:
        効果のレベル。8 ビット整数で指定します。数字の後の b は必要ではありません。1 レベル = 0b です。
      • ambient:
        ビーコンからの効果であるかどうか。true または false で指定します。true が指定されると、パーティクルがかなり薄くなり、画面の右上に表示される効果のアイコンに葱色の縁が追加されます(show_icon タグの値が true のとき)。
      • id: **
        効果の種類。効果 ID を文字列で指定します。
      • show_particle:
        パーティクルを表示するかどうか。true または false で指定します。ambient タグの値が true のときは、このタグは効力を失います。
  • nutrition: *
    満腹度の回復値。整数で指定します。
  • can_always_eat:
    満腹度が満ちているときでも食べられるかどうか。true または false で指定します。
  • eat_seconds:
    食べる速度。浮動小数点数で指定します。数字の後の f は必要ではありません。デフォルトは 1.6f です。
  • using_converts_to:(1.21 のアップデート)
    食べたときに置換されるアイテム。
    • components:
      アイテムのコンポーネント。
    • id: **
      アイテム。アイテム ID を文字列で指定します。

節リストへ戻る

minecraft:hide_additional_tooltip

追加情報をアイテムのツールチップから隠すかどうかを指定します。すべてのアイテムに適用されます。

minecraft:netherite_upgrade_smithing_template[minecraft:hide_additional_tooltip= {}]

中身はありません。このコンポーネントを使用した時点で適用されます。

節リストへ戻る

minecraft:hide_tooltip

アイテムのツールチップを隠すかどうかを指定します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:hide_tooltip= {}]

中身はありません。このコンポーネントを使用した時点で適用されます。

節リストへ戻る

minecraft:instrument

ヤギの角笛が再生する音声を指定します。ヤギの角笛にのみ適用されます。

minecraft:goat_horn[minecraft:instrument= "minecraft:seek_goat_horn"]

文字列で指定します。

  • "minecraft:ponder_goat_horn" は沈思。
  • "minecraft:sing_goat_horn" は歌声。
  • "minecraft:seek_goat_horn" は探求。
  • "minecraft:feel_goat_horn" は感覚。
  • "minecraft:admire_goat_horn" は称賛。
  • "minecraft:call_goat_horn" は号令。
  • "minecraft:yearn_goat_horn" は憧憬。
  • "minecraft:dream_goat_horn" は夢想。

節リストへ戻る

minecraft:intangible_projectile

飛び道具をクリエイティブ モード以外のプレイヤーが回収できるかどうかを指定します。ブロックに刺せる飛び道具エンティティに変化するアイテムにのみ適用されます。

minecraft:arrow[minecraft:intangible_projectile= {}]

中身はありません。このコンポーネントを使用した時点で適用されます。

節リストへ戻る

minecraft:item_name

アイテムの名前を指定します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:item_name= '{fallback: "Diamond", italic: false, translate: "item.minecraft.diamond", type: "translatable"}']

未整形 JSON テキスト形式で指定しますが、次のようにシンプルに記述することもできます。

minecraft:apple[minecraft:item_name= '"Hello, world!"']

このコンポーネントは、minecraft:custom_name コンポーネントとよく似ていますね。

簡単に説明すると、minecraft:custom_name コンポーネントは金床で変更することができるカスタム アイテム名で、minecraft:item_name コンポーネントは金床で変更することができないアイテム名です。

例えば、次のアイテムの名前を金床で変更してみます。

minecraft:apple[minecraft:custom_name= '"Hello, world!"']
minecraft:apple[minecraft:item_name= '"Hello, world!"']

金床で変更したアイテムの NBT データを見てみます。minecraft:item_name コンポーネントの中身は変更されずに、minecraft:custom_name コンポーネントが追加されています。

{"minecraft:custom_name": '"Hello, new name!"'}
{"minecraft:item_name": '"Hello, world!"', "minecraft:custom_name": '"Hello, new name!"'}

節リストへ戻る

minecraft:lock

ロックされているコンテナーを含むブロックを開くことができるアイテムの名前を指定します。コンテナーを含むブロックにのみ適用されます。

minecraft:chest[minecraft:lock= "password1234"]

文字列で指定します。この例では、「password1234」という名前のアイテムでのみ開くことができることを指定しています。minecraft:item_name コンポーネントで指定したアイテム名では開くことができません。

節リストへ戻る

minecraft:lodestone_tracker

ロードストーン コンパスの情報を指定します。コンパスにのみ適用されます。

minecraft:compass[minecraft:lodestone_tracker= {tracked: false, target: {pos: [I; 0, 64, 0], dimension: "minecraft:overworld"}}]

JSON 風に整形:

minecraft:compass[
  minecraft:lodestone_tracker= {
    tracked: false,
    target: {
      pos: [I; 0, 64, 0],
      dimension: "minecraft:overworld"
    }
  }
]
  • tracked:
    target タグで指定した座標とディメンションにロードストーンが設置されていなければ、このコンポーネントの中身を空にするかどうか。true または false で指定します。デフォルトは true です。
  • target:
    • pos: **
      ロードストーン コンパスが示す座標。整数のリストで指定します。
    • dimension: **
      ロードストーン コンパスが正常に動作するディメンション。ディメンション ID を文字列で指定します。

節リストへ戻る

minecraft:lore

アイテムに説明を追加します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:lore= ['{color: "gray", italic: false, text: "This is a SUPER APPLE!", type: "text"}']]

未整形 JSON テキスト形式で指定しますが、次のようにシンプルに記述することもできます。

minecraft:chest[minecraft:lore= ['"(+NBT)"', '"(-NBT)"']]

節リストへ戻る

minecraft:map_color

地図(白紙の地図ではありません)のテクスチャにあるえんぴつの色を指定します。探検家の地図のテクスチャの色が違っているあれです。地図にのみ適用されます。

minecraft:filled_map[minecraft:map_color= 11815916]

整数で指定します。整数には、16 進数のカラー コードを 10 進数に変換した値を入力します。Minecraft Wiki の 10 進数のカラー コード計算機で計算することもできます。

節リストへ戻る

minecraft:map_decorations

地図(白紙の地図ではありません)にアイコンを追加します。地図に記録した旗のアイコンや、探検家の地図に表示されるアイコンなどのあれです。minecraft:map_id コンポーネントが必要です。ワールドに参加し直さないと、更新されないことがあります。地図にのみ適用されます。

minecraft:filled_map[minecraft:map_decorations= {+: {rotation: 180.0f, x: 0.0d, z: 0.0d, type: "minecraft:target_x"}}]

JSON 風に整形:

minecraft:filled_map[
  minecraft:map_decorations= {
    +: {
      rotation: 180.0f,
      x: 0.0d,
      z: 0.0d,
      type: "minecraft:target_x"
    }
  }
]
  • +:
    + タグとして指定していますが、任意の文字列でタグを指定できます。
    • rotation: **
      アイコンの方向。浮動小数点数で指定します。数字の後の f は必要ではありません。
    • x: **
      アイコンの X 座標の位置。倍精度浮動小数点数で指定します。数字の後の d は必要ではありません。
    • z: **
      アイコンの z 座標の位置。倍精度浮動小数点数で指定します。数字の後の d は必要ではありません。
    • type: **
      アイコンの種類。文字列で指定します。
      • "minecraft:banner_black" は黒色の旗。
      • "minecraft:banner_blue" は青色の旗。
      • "minecraft:banner_brown" は茶色の旗。
      • "minecraft:banner_cyan" は青緑色の旗。
      • "minecraft:banner_gray" は灰色の旗。
      • "minecraft:banner_green" は緑色の旗。
      • "minecraft:banner_light_blue" は空色の旗。
      • "minecraft:banner_light_gray" は薄灰色の旗。
      • "minecraft:banner_lime" は黄緑色の旗。
      • "minecraft:banner_magenta" は赤紫色の旗。
      • "minecraft:banner_orange" は橙色の旗。
      • "minecraft:banner_pink" は桃色の旗。
      • "minecraft:banner_purple" は紫色の旗。
      • "minecraft:banner_red" は赤色の旗。
      • "minecraft:banner_white" は白色の旗。
      • "minecraft:banner_yellow" は黄色の旗。
      • "minecraft:blue_marker" は青色のマーカー。プレイヤーの印が青色になったアイコンです。
      • "minecraft:frame" は額縁の印。
      • "minecraft:jungle_temple" はジャングルの寺院のアイコン。
      • "minecraft:mansion" は森の洋館の印。
      • "minecraft:monument" は海底神殿の印。
      • "minecraft:player" はプレイヤーの印。
      • "minecraft:player_off_limits" は白色の球体。プレイヤーが地図の描画からすごーく離れているときに表示されるアイコンです。
      • "minecraft:player_off_map" は白色の球体。プレイヤーが地図の描画から離れているときに表示されるアイコンです。
      • "minecraft:red_marker" は赤色のマーカー。プレイヤーの印が赤色になったアイコンです。
      • "minecraft:red_x" は赤色のバツ。宝の地図に使用されているアイコンです。
      • "minecraft:swamp_hut" はウィッチの小屋のアイコン。
      • "minecraft:target_point" は赤色の下向き三角形。少し大きめです。
      • "minecraft:target_x" は白色のバツ。
      • "minecraft:trial_chambers" は試練の間のアイコン。
      • "minecraft:village_desert" は砂漠の村のアイコン。
      • "minecraft:village_plains" は平原の村のアイコン。
      • "minecraft:village_savanna" はサバンナの村のアイコン。
      • "minecraft:village_snowy" は雪原の村のアイコン。
      • "minecraft:village_taiga" はタイガの村のアイコン。

アイコンが地図の範囲内に存在しないと、このコンポーネントの意味がなくなってしまいます。ご注意ください。

節リストへ戻る

minecraft:map_id

地図(白紙の地図ではありません)の ID を指定します。地図にのみ適用されます。

minecraft:filled_map[minecraft:map_id= 0]

整数で指定します。

節リストへ戻る

minecraft:max_damage

アイテムの最大耐久値を指定します。最大スタック個数が 1 個のアイテムにのみ適用されます。

minecraft:diamond_axe[minecraft:max_damage= 2]

整数で指定します。

節リストへ戻る

minecraft:max_stack_size

最大スタック個数を指定します。耐久値を所有しないアイテムにのみ適用されます。

minecraft:apple[minecraft:max_stack_size= 99]

1 から 99 までの整数で指定します。

節リストへ戻る

minecraft:note_block_sound

プレイヤーの頭を音符ブロックの上に置き、その音符ブロックを鳴らしたときに再生される音声を指定します。プレイヤーの頭にのみ適用されます。

minecraft:player_head[minecraft:note_block_sound= "minecraft:entity.arrow.hit_player"]

サウンド ID を文字列で指定します。

節リストへ戻る

minecraft:ominous_bottle_amplifier

(1.21 のアップデート)不吉な瓶に適用される不吉な予感のレベルを指定します。不吉な瓶にのみ適用されます。

minecraft:ominous_bottle[minecraft:ominous_bottle_amplifier= 4]

整数で指定します。1 レベル = 0 です。

節リストへ戻る

minecraft:pot_decorations

飾り壺の側面に使用される模様を指定します。飾り壺にのみ適用されます。

minecraft:decorated_pot[minecraft:pot_decorations= ["minecraft:angler_pottery_sherd", "minecraft:archer_pottery_sherd", "minecraft:blade_pottery_sherd", "minecraft:brick"]]

JSON 風に整形:

minecraft:decorated_pot[
  minecraft:pot_decorations= [
    "minecraft:angler_pottery_sherd",
    "minecraft:archer_pottery_sherd",
    "minecraft:blade_pottery_sherd",
    "minecraft:brick"
  ]
]

壺の欠片のアイテム ID または minecraft:brick を文字列のリストで指定します。文字列は 5 個未満である必要があります。

節リストへ戻る

minecraft:potion_contents

効能付きのアイテムの効果を指定します。ポーション、スプラッシュ ポーション、残留ポーション、効能付きの矢に適用されます。

minecraft:potion[minecraft:potion_contents= {potion: "minecraft:healing"}]

JSON 風に整形:

minecraft:potion[
  minecraft:potion_contents= {
    potion: "minecraft:healing"
  }
]

または

minecraft:potion[minecraft:potion_contents= {custom_color: 15269688, custom_effects: [{duration: 200, show_icon: true, amplifier: 2b, ambient: false, id: "minecraft:regeneration", show_particle: true}, {duration: 200, show_icon: true, amplifier: 0b, ambient: false, id: "minecraft:resistance", show_particle: true}]}]

JSON 風に整形:

minecraft:potion[
  minecraft:potion_contents= {
    custom_color: 15269688,
    custom_effects: [
      {
        duration: 200,
        show_icon: true,
        amplifier: 2b,
        ambient: false,
        id: "minecraft:regeneration",
        show_particle: true
      },
      {
        duration: 200,
        show_icon: true,
        amplifier: 0b,
        ambient: false,
        id: "minecraft:resistance",
        show_particle: true
      }
    ]
  }
]
  • potion:
    効果の種類。文字列で指定します。
    • "minecraft:awkward" は奇妙。
    • "minecraft:fire_resistance" は耐火。
    • "minecraft:harming" は負傷。
    • "minecraft:healing" は治癒。
    • "minecraft:infested" は虫食い。
    • "minecraft:invisibility" は透明化。
    • "minecraft:leaping" は跳躍。
    • "minecraft:long_fire_resistance" は耐火(時間延長)。
    • "minecraft:long_invisibility" は透明化(時間延長)。
    • "minecraft:long_leaping" は跳躍(時間延長)。
    • "minecraft:long_night_vision" は暗視(時間延長)。
    • "minecraft:long_poison" は毒(時間延長)。
    • "minecraft:long_regeneration" は再生(時間延長)。
    • "minecraft:long_slow_falling" は低速落下(時間延長)。
    • "minecraft:long_slowness" は鈍化(時間延長)。
    • "minecraft:long_strength" は力(時間延長)。
    • "minecraft:long_swiftness" は俊敏(時間延長)。
    • "minecraft:long_turtle_master" はタートル マスター(時間延長)。
    • "minecraft:long_water_breathing" は水中呼吸(時間延長)。
    • "minecraft:long_weakness" は弱化(時間延長)。
    • "minecraft:luck" は幸運。
    • "minecraft:mundane" はありふれ。
    • "minecraft:night_vision" は暗視。
    • "minecraft:oozing" は滲出。
    • "minecraft:poison" は毒。
    • "minecraft:regeneration" は再生。
    • "minecraft:slow_falling" は低速落下。
    • "minecraft:slowness" は鈍化。
    • "minecraft:strength" は力。
    • "minecraft:strong_harming" は負傷(レベル強化)。
    • "minecraft:strong_healing" は治癒(レベル強化)。
    • "minecraft:strong_leaping" は跳躍(レベル強化)。
    • "minecraft:strong_poison" は毒(レベル強化)。
    • "minecraft:strong_regeneration" は再生(レベル強化)。
    • "minecraft:strong_slowness" は鈍化(レベル強化)。
    • "minecraft:strong_strength" は力(レベル強化)。
    • "minecraft:strong_swiftness" は俊敏(レベル強化)。
    • "minecraft:strong_turtle_master" はタートル マスター(レベル強化)。
    • "minecraft:swiftness" は俊敏。
    • "minecraft:thick" は濃厚。
    • "minecraft:turtle_master" はタートル マスター。
    • "minecraft:water" は水。
    • "minecraft:water_breathing" は水中呼吸。
    • "minecraft:weakness" は弱化。
    • "minecraft:weaving" は巣張り。
    • "minecraft:wind_charged" は蓄風。
    • potion タグを使用しなかった場合は、クラフト不可能なポーションになります。
  • custom_color:
    アイテムの色。整数で指定します。整数には、16 進数のカラー コードを 10 進数に変換した値を入力します。Minecraft Wiki の 10 進数のカラー コード計算機で計算することもできます。
  • custom_effects:
    効果をリストで指定します。
    • duration:
      効果の持続時間。整数で指定します。
    • show_icon:
      効果が付与されたときに、画面の右上に効果のアイコンを表示するかどうか。true または false で指定します。
    • amplifier:
      効果のレベル。8 ビット整数で指定します。数字の後の b は必要ではありません。1 レベル = 0b です。
    • ambient:
      ビーコンからの効果であるかどうか。true または false で指定します。true が指定されると、パーティクルがかなり薄くなり、画面の右上に表示される効果のアイコンに葱色の縁が追加されます(show_icon タグの値が true のとき)。
    • id: **
      効果の種類。効果 ID を文字列で指定します。
    • show_particle:
      パーティクルを表示するかどうか。true または false で指定します。ambient タグの値が true のときは、このタグは効力を失います。

節リストへ戻る

minecraft:profile

プレイヤーの頭の情報を指定します。プレイヤーの頭にのみ適用されます。

minecraft:player_head[minecraft:profile= {name: "per_slash", id: [I; 973795650, 936461337, -1390631167, 1930233224], properties: [{signature: "X939+kSYPL5NkiEK9XpnakltgyJ/xL3NXS3ZF4vRk+B6amc94WeOMA8gn0UVd/lTvyVjvTMIJlEQpM1GsFCanC39IDkS68LpTd4Pb7JWJ3FQDFuIWXv+l/4KInspIffdcgChmmgDf0Xf32YEbDFuQbY302c6l9vjFEUXhQt0fXZ+h93Mb5AOo+bMCJOWfxVEWpcDuL1TEeivQ6JUTw3OTDCvDUn8NIM3UDV46hFN4EgvVnK8O+hi82oEwz267A/TSYqzvSwqMIhYlYzcP38qyt30CSCGngPrzjYJ8LY3OXa+RjDnhdZM28YLMflZmejZ6u/hZ0SlPFdWcajW/On2K3gXLA/bCQxqFgC3On7WGEGodWmt8apKVEeHmd2azCIHu9p2TFNGzW2xIMT+4Q3lFgcBR+4KzOdmzFfHV5EQHCW8BpupNsm+XsvFpIlx3IwGNw4BW6ml/k8ffwOXvnm4l1+ZdO7xCZtcObR6AZ4D8afzed+GGNY0gyj39o1YZaM2FP3Zld25hi2kkHPHkWZ3nrIl6n/9j8ONDnCya1D1r0wnUkTmmJgRKZUMp8i+wsshNhr7SHrtlAwsDoneHk6aik1T0GdQMzDbGiz3NXum/PiKu9VK9b0FSZyc3LyBVd5hrl1m97zvXHhz5Jnb95NY3YVpkStuUcgpUlOzCaBVVxA=", name: "textures", value: "ewogICJ0aW1lc3RhbXAiIDogMTcxMzE5ODI2NzQxMSwKICAicHJvZmlsZUlkIiA6ICIzYTBhZjE0MjM3ZDE0NDE5YWQxY2E3MDE3MzBkMDU4OCIsCiAgInByb2ZpbGVOYW1lIiA6ICJwZXJfc2xhc2giLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDlhZjEwNTkzNjE1NDdkMWI3NDRmMjk2YjIxZjg5NmE3YjcxYjhiNzg4NTIwNzk4YjhlOGIwNDJmOTNkMmUyYyIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9"}]}]

JSON 風に整形:

minecraft:player_head[
  minecraft:profile= {
    name: "per_slash",
    id: [I; 973795650, 936461337, -1390631167, 1930233224],
    properties: [
      {
        signature: "X939+kSYPL5NkiEK9XpnakltgyJ/xL3NXS3ZF4vRk+B6amc94WeOMA8gn0UVd/lTvyVjvTMIJlEQpM1GsFCanC39IDkS68LpTd4Pb7JWJ3FQDFuIWXv+l/4KInspIffdcgChmmgDf0Xf32YEbDFuQbY302c6l9vjFEUXhQt0fXZ+h93Mb5AOo+bMCJOWfxVEWpcDuL1TEeivQ6JUTw3OTDCvDUn8NIM3UDV46hFN4EgvVnK8O+hi82oEwz267A/TSYqzvSwqMIhYlYzcP38qyt30CSCGngPrzjYJ8LY3OXa+RjDnhdZM28YLMflZmejZ6u/hZ0SlPFdWcajW/On2K3gXLA/bCQxqFgC3On7WGEGodWmt8apKVEeHmd2azCIHu9p2TFNGzW2xIMT+4Q3lFgcBR+4KzOdmzFfHV5EQHCW8BpupNsm+XsvFpIlx3IwGNw4BW6ml/k8ffwOXvnm4l1+ZdO7xCZtcObR6AZ4D8afzed+GGNY0gyj39o1YZaM2FP3Zld25hi2kkHPHkWZ3nrIl6n/9j8ONDnCya1D1r0wnUkTmmJgRKZUMp8i+wsshNhr7SHrtlAwsDoneHk6aik1T0GdQMzDbGiz3NXum/PiKu9VK9b0FSZyc3LyBVd5hrl1m97zvXHhz5Jnb95NY3YVpkStuUcgpUlOzCaBVVxA=",
        name: "textures",
        value: "ewogICJ0aW1lc3RhbXAiIDogMTcxMzE5ODI2NzQxMSwKICAicHJvZmlsZUlkIiA6ICIzYTBhZjE0MjM3ZDE0NDE5YWQxY2E3MDE3MzBkMDU4OCIsCiAgInByb2ZpbGVOYW1lIiA6ICJwZXJfc2xhc2giLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDlhZjEwNTkzNjE1NDdkMWI3NDRmMjk2YjIxZjg5NmE3YjcxYjhiNzg4NTIwNzk4YjhlOGIwNDJmOTNkMmUyYyIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9"
      }
    ]
  }
]
  • name:
    プロフィール名。文字列で入力します。プレイヤー名と呼ばれているあれです。
  • id:
    プロフィール名に対する UUID。整数のリストで指定します。
  • properties:
    リストで指定します。私には理解しがたいため、Minecraft Wiki のアイテム コンポーネントの記事をご覧ください。
    • signature:
      文字列で指定します。
    • name: **
      文字列で指定します。
    • value: **
      文字列で指定します。

プレイヤーの頭が欲しいだけの場合は、次のようになります。

minecraft:player_head[minecraft:profile= {name: "per_slash"}]

節リストへ戻る

minecraft:rarity

アイテムの希少度を指定します。これはアイテム名の色に関係します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:rarity= "rare"]

文字列で指定します。

"common" は一般。アイテム名の色は白色または黒色です。
"uncommon" はアンコモン。アイテム名の色は黄色です。ネザー スターやエンチャントの瓶などに使用されます。
"rare" はレア。アイテム名の色は空色です。ビーコンやエンチャントされた一般のアイテムなどに使用されます。
"epic" はエピック。アイテム名の色は赤紫色です。エンチャントされた金のリンゴやコマンド ブロックなどに使用されます。

節リストへ戻る

minecraft:recipes

知恵の本で解禁できるレシピを指定します。知恵の本にのみ適用されます。

minecraft:knowledge_book[minecraft:recipes= ["minecraft:beacon", "minecraft:golden_apple"]]

JSON 風に整形:

minecraft:knowledge_book[
  minecraft:recipes= [
    "minecraft:beacon",
    "minecraft:golden_apple"
  ]
]

レシピ ID を文字列のリストで指定します。/recipe take @s * でレシピをすべて剥奪して使用してみてください。

節リストへ戻る

minecraft:repair_cost

金床で修繕、エンチャント、または名前を変更するときの経験値レベルのコストを指定します。すべてのアイテムに適用されます。

minecraft:diamond_sword[minecraft:repair_cost= 30]

整数で指定します。

節リストへ戻る

minecraft:stored_enchantments

エンチャントの本にエンチャントを追加します。minecraft:enchantments コンポーネントのエンチャントの本バージョンです。エンチャントの本にのみ適用されます。

minecraft:enchanted_book[minecraft:stored_enchantments= {show_in_tooltip: true, levels: {"minecraft:protection": 4}}]

JSON 風に整形:

minecraft:enchanted_book[
  minecraft:stored_enchantments= {
    show_in_tooltip: true,
    levels: {
      "minecraft:protection": 4
    }
  }
]
  • show_in_tooltip:
    エンチャントをアイテムのツールチップに表示するかどうか。true または false で指定します。「ダメージ軽減 IV」とかのあれです。
  • levels:
    levels タグの中に、エンチャント ID のタグを入れます。そのタグの中では、エンチャントのレベルを整数で指定します。

複数のエンチャントを追加したい場合は、次のようになります。

minecraft:enchanted_book[minecraft:stored_enchantments= {levels: {"minecraft:unbreaking": 3, "minecraft:protection": 4}}]

JSON 風に整形:

minecraft:enchanted_book[
  minecraft:stored_enchantments= {
    levels: {
      "minecraft:unbreaking": 3,
      "minecraft:protection": 4
    }
  }
]

節リストへ戻る

minecraft:suspicious_stew_effects

怪しげなシチューを食べると付与される効果を指定します。怪しげなシチューにのみ適用されます。

minecraft:suspicious_stew[minecraft:suspicious_stew_effects= [{duration: 200, id: "minecraft:regeneration"}, {duration: 200, id: "minecraft:resistance"}]]

JSON 風に整形:

minecraft:suspicious_stew[
  minecraft:suspicious_stew_effects= [
    {
      duration: 200,
      id: "minecraft:regeneration"
    },
    {
      duration: 200,
      id: "minecraft:resistance"
    }
  ]
]

リストで指定します。

  • duration:
    効果の持続時間。整数で指定します。
  • id: **
    効果の種類。効果 ID を文字列で指定します。

節リストへ戻る

minecraft:tool

道具の情報を指定します。すべてのアイテムに適用されます。

minecraft:apple[minecraft:tool= {damage_per_block: 2, default_mining_speed: 1.0f, rules: [{blocks: "#minecraft:mineable/pickaxe", correct_for_drops: true, speed: 2.0f}, {blocks: ["minecraft:beacon"], correct_for_drops: false, speed: 12.0f}]}]

JSON 風に整形:

minecraft:apple[
  minecraft:tool= {
    damage_per_block: 2,
    default_mining_speed: 1.0f,
    rules: [
      {
        blocks: "#minecraft:mineable/pickaxe",
        correct_for_drops: true,
        speed: 2.0f
      },
      {
        blocks: [
          "minecraft:beacon"
        ],
        correct_for_drops: false,
        speed: 12.0f
      }
    ]
  }
]
  • damage_per_block:
    ブロックを破壊するたびに消費する耐久値。浮動小数点数で指定します。数字の後の f は必要ではありません。
  • default_mining_speed:
    ブロックを破壊する速度。浮動小数点数で指定します。数字の後の f は必要ではありません。デフォルトは 1.0f です。speed タグはこのタグを上書きします。
  • rules: *
    特別な動作をするブロックと動作をリストで指定します。
    • blocks: **
      ブロック。ブロック ID を文字列または文字列のリストで指定、または # を含めたブロック タグを文字列で指定します。ブロック ID は文字列のリストで複数の項目を指定できますが、ブロック タグは 1 個の項目しか指定できません
    • correct_for_drops:
      blocks タグで指定したブロックに対して適正な道具であるかどうか。true または false で指定します。
    • speed:
      blocks タグで指定したブロックを破壊する速度。浮動小数点数で指定します。数字の後の f は必要ではありません。このタグは default_mining_speed タグを上書きします。

節リストへ戻る

minecraft:trim

防具に装飾を追加します。防具にのみ適用されます。

minecraft:diamond_chestplate[minecraft:trim= {material: "minecraft:gold", show_in_tooltip: true, pattern: "minecraft:tide"}]

JSON 風に整形:

minecraft:diamond_chestplate[
  minecraft:trim= {
    material: "minecraft:gold",
    show_in_tooltip: true,
    pattern: "minecraft:tide"
  }
]
  • material: *
    装飾の素材。文字列で指定します。
    • "minecraft:amethyst" はアメジスト素材。
    • "minecraft:copper" は銅素材。
    • "minecraft:diamond" はダイヤモンド素材。
    • "minecraft:emerald" はエメラルド素材。
    • "minecraft:gold" は金素材。
    • "minecraft:iron" は鉄素材。
    • "minecraft:lapis" はラピスラズリ素材。
    • "minecraft:netherite" はネザライト素材。
    • "minecraft:quartz" はネザークォーツ素材。
    • "minecraft:redstone" はレッドストーン素材。
  • show_in_tooltip:
    装飾をアイテムのツールチップに表示するかどうか。true または false で指定します。「潮流風の装飾; 金素材」とかのあれです。
  • pattern: *
    装飾の模様。文字列で指定します。
    • "minecraft:bolt" はネジ止め風の装飾。
    • "minecraft:coast" は海洋風の装飾。
    • "minecraft:dune" は砂丘風の装飾。
    • "minecraft:eye" はエンダーアイ風の装飾。
    • "minecraft:flow" は旋風の装飾。
    • "minecraft:host" は主人風の装飾。
    • "minecraft:raiser" は牧者風の装飾。
    • "minecraft:rib" はあばら模様の装飾。
    • "minecraft:sentry" は略奪者風の装飾。
    • "minecraft:shaper" は職人風の装飾。
    • "minecraft:silence" は静寂の装飾。
    • "minecraft:snout" はブタの鼻風の装飾。
    • "minecraft:spire" は尖塔風の装飾。
    • "minecraft:tide" は潮流風の装飾。
    • "minecraft:vex" はヴェックス風の装飾。
    • "minecraft:ward" は監獄風の装飾。
    • "minecraft:wayfinder" は先駆者風の装飾。
    • "minecraft:wild" は大自然風の装飾。

節リストへ戻る

minecraft:unbreakable

不可壊であるかどうかを指定します。すべてのアイテムに適用されます。

minecraft:diamond_hoe[minecraft:unbreakable= {show_in_tooltip: true}]
  • show_in_tooltip:
    「不可壊」をアイテムのツールチップに表示するかどうか。true または false で指定します。

節リストへ戻る

minecraft:writable_book_content

本と羽根ペンに記述された内容を指定します。本と羽根ペンにのみ適用されます。

minecraft:writable_book[minecraft:writable_book_content= {pages: [{raw: "Page 1?"}, {raw: "Page 2?"}, {filtered: "Filtered?", raw: "Page 3?"}]}]

JSON 風に整形:

minecraft:writable_book[
  minecraft:writable_book_content= {
    pages: [
      {
        raw: "Page 1?"
      },
      {
        raw: "Page 2?"
      },
      {
        filtered: "Filtered?",
        raw: "Page 3?"
      }
    ]
  }
]
  • pages:
    リストで指定します。
    • filtered:
      チャットのフィルターがオンになっているときに表示される内容。文字列で指定します。よくわからない。
    • raw: **
      記述された内容。文字列で指定します。

節リストへ戻る

minecraft:written_book_content

記入済みの本の情報を指定します。記入済みの本にのみ適用されます。

minecraft:written_book[minecraft:written_book_content= {generation: 1, pages: [{raw: '"Page 1?"'}, {raw: '{text: "Page 2?", type: "text"}'}, {filtered: '"Filtered?"', raw: '"Page 3?"'}, {filtered: '{text: "Filtered?", type: "text"}', raw: '"Page 4?"'}], author: "Puppet", title: {filtered: "Hello, filtered!", raw: "Hello, world!"}, resolved: false}]

JSON 風に整形:

minecraft:written_book[
  minecraft:written_book_content= {
    generation: 0,
    pages: [
      {
        raw: '"Page 1?"'
      },
      {
        raw: '{text: "Page 2?", type: "text"}'
      },
      {
        filtered: '"Filtered?"',
        raw: '"Page 3?"'
      },
      {
        filtered: '{text: "Filtered?", type: "text"}',
        raw: '"Page 4?"'
      }
    ],
    author: "Puppet",
    title: {
      filtered: "Hello, filtered!",
      raw: "Hello, world!"
    },
    resolved: false
  }
]
  • generation:
    コピーされた回数。整数で指定します。
  • pages:
    リストで指定します。
  • author: *
    著者。文字列で指定します。
  • title: *
    本のタイトル。
    • filtered:
      チャットのフィルターがオンになっているときに表示される本のタイトル。文字列で指定します。よくわからない。
    • raw: *
      本のタイトル。文字列で指定します。
  • resolved:
    簡単に説明すると、記入済みの本が開かれたかどうか。もっと詳しく説明すると、pages タグに記述された未整形 JSON テキスト形式に含まれる scoreselectornbt の要素の値が固定されたかどうか。true または false で指定します。

節リストへ戻る

余談: アイテム コンポーネントを NBT 構造(未整形 JSON 的な構造)で記述する

いままでは、/give や /item などのコマンド用の記述方法でした。これを NBT 構造(未整形 JSON 的な構造)で記述するには、次のように変更します。

/give や /item などのコマンド用:

minecraft:apple[minecraft:hide_tooltip= {}, minecraft:attribute_modifiers= {show_in_tooltip: false, modifiers: [{amount: 2.5d, name: "attribute.attack_damage", slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; 0, 0, 0, 0], operation: "add_value"}]}]

JSON 風に整形:

minecraft:apple[
  minecraft:hide_tooltip= {},
  minecraft:attribute_modifiers= {
    show_in_tooltip: false,
    modifiers: [
      {
        amount: 2.5d,
        name: "attribute.attack_damage",
        slot: "mainhand",
        type: "minecraft:generic.attack_damage",
        uuid: [I; 0, 0, 0, 0],
        operation: "add_value"
      }
    ]
  }
]

NBT 構造(未整形 JSON 的な構造):

{components: {"minecraft:hide_tooltip": {}, "minecraft:attribute_modifiers": {show_in_tooltip: false, modifiers: [{amount: 2.5d, name: "attribute.attack_damage", slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; 0, 0, 0, 0], operation: "add_value"}]}}, count: 1, id: "minecraft:apple"}

JSON 風に整形:

{
  components: {
    "minecraft:hide_tooltip": {},
    "minecraft:attribute_modifiers": {
      show_in_tooltip: false,
      modifiers: [
        {
          amount: 2.5d,
          name: "attribute.attack_damage",
          slot: "mainhand",
          type: "minecraft:generic.attack_damage",
          uuid: [I; 0, 0, 0, 0],
          operation: "add_value"
        }
      ]
    }
  },
  count: 1,
  id: "minecraft:apple"
}

見て学べってやつですね。ちなみに、いったん /give コマンドで入手して利き手に持ち、/data get entity @s SelectedItem を実行して参照することもできます。

節リストへ戻る

余談: NBT と JSON は同じではない

NBT:

{
  components: {
    "minecraft:hide_tooltip": {},
    "minecraft:attribute_modifiers": {
      modifiers: [
        {
          amount: 2.5d,
          name: "attribute.attack_damage",
          slot: "mainhand",
          type: "minecraft:generic.attack_damage",
          uuid: [I; 0, 0, 0, 0],
          operation: "add_value"
        }
      ]
    }
  },
  count: 1,
  id: "minecraft:apple"
}

JSON:

{
  "components": {
    "minecraft:hide_tooltip": {},
    "minecraft:attribute_modifiers": {
      "modifiers": [
        {
          "amount": 2.5,
          "name": "attribute.attack_damage",
          "slot": "mainhand",
          "type": "minecraft:generic.attack_damage",
          "uuid": [0, 0, 0, 0],
          "operation": "add_value"
        }
      ]
    }
  },
  "count": 1,
  "id": "minecraft:apple"
}

NBT のタグも JSON と同じように二重引用符で囲むことができます。ただし、完全に同じにはならないです。

節リストへ戻る

余談: Markdown のコード ブロックで NBT の色付け(シンタックス ハイライト)を行う

Markdwon のコード ブロックの色付け(シンタックス ハイライト)は、CoffeeScript 用のものを使っています。

```coffee
minecraft:apple[minecraft:attribute_modifiers= {show_in_tooltip: true, modifiers: [{amount: 2.5d, name: "attribute.attack_damage", slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; 0, 0, 0, 0], operation: "add_value"}]}]
```
```coffee
{components: {"minecraft:attribute_modifiers": {modifiers: [{amount: 2.5d, name: "attribute.attack_damage", slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; 0, 0, 0, 0], operation: "add_value"}]}}, count: 1, id: "minecraft:apple"}
```

CoffeeScript 全然しらないのですが、これで NBT に色付けできることに気づいてしまいました。ありがとう、CoffeeScript さん!ちなみに、1 個上の節で説明したとおり NBT と JSON は同じものではないので、「json」と指定するとエラーします。

節リストへ戻る

余談: NBT における半角スペースの必要性

これは完全に自己満足のお話。

当方、一時期半角スペースなしで NBT を記述していたことがあります。

minecraft:apple[minecraft:attribute_modifiers={show_in_tooltip:true,modifiers:[{amount:2.5d,name:"attribute.attack_damage",slot:"mainhand",type:"minecraft:generic.attack_damage",uuid:[I;0,0,0,0],operation:"add_value"}]}]

NBT が呼吸しづらそう。

あと、Minecraft でテキスト入力中に Ctrl + 方向キー を押すと、カーソルが次の半角スペースまで飛ばされます。半角スペースがあると便利なのですが、半角スペースがないと、Minecraft 内でコマンドの一部を編集したいと思ったときに、左方向キーを長押して編集したい箇所まで移動したりマウスを使ったりしないといけなくなります。

minecraft:apple[minecraft:attribute_modifiers= {show_in_tooltip: true, modifiers: [{amount: 2.5d, name: "attribute.attack_damage", slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; 0, 0, 0, 0], operation: "add_value"}]}]

半角スペースを設ける箇所は、カンマ , とコロン : の次にしています。これは /data コマンドで NBT を取得したときと一緒のルールです(「以下のエンティティ データを持っています」とかのあれ)。

節リストへ戻る

参考

Item format/1.20.5 – Minecraft Wiki

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0