Skip to content
cccskills
FreePublished on GitHub

mc_cli_get_blocks

CLI版 mc-cli get-blocks コマンドの引数、出力形式、BlockData/EntityData の読み方。レッドストーン回路を調査・検証する前に必ず読む。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md5.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Minecraft ブロック取得 Skill

このスキルは、Minecraft サーバー(Fabric)の HTTP API を使用して、指定された座標範囲(直方体)に含まれるブロックの情報を JSON 形式で取得し、解析するためのものです。

使用方法

mc-cli ツールを使用して、以下のコマンドを実行します。

mc-cli get-blocks --pos1 <開始座標> --pos2 <終了座標>

引数

  • --pos1: 範囲の開始座標 "x,y,z"(整数)。
  • --pos2: 範囲の終了座標 "x,y,z"(整数)。
  • --include-entities: (任意) 指定すると、同じ範囲内のエンティティ情報も取得します。
  • --interval: (任意) 実行間隔(ゲームチック、1=50ms)。デフォルトは 0。
  • --count: (任意) 実行回数。デフォルトは 1。
  • --format: (任意) 出力形式。json または grid。デフォルトは json。
  • --url: (任意) サーバーの URL。デフォルトは http://localhost:8080。

出力形式

--format json(デフォルト)の場合

コマンドの実行結果は、解析しやすいように JSON 形式で出力されます。

--include-entities 未指定時

data フィールドには、各実行回ごとのブロックデータリストを格納した二次元配列([][]BlockData)がセットされます。

成功時のレスポンス例 (count=1 の場合)

{
  "success": true,
  "data": [
    [
      ["minecraft:stone", [100, 64, 100], {}],
      ["minecraft:redstone_wire", [101, 64, 100], {"power": "15", "north": "side", "south": "side"}]
    ]
  ]
}

成功時のレスポンス例 (count=2, interval=10 の場合)

{
  "success": true,
  "data": [
    [
      ["minecraft:redstone_wire", [100, 64, 100], {"power": "0"}]
    ],
    [
      ["minecraft:redstone_wire", [100, 64, 100], {"power": "15"}]
    ]
  ]
}

--include-entities 指定時

data フィールドには、blocks と entities を含むオブジェクトの配列([]BlocksAndEntities)がセットされます。

成功時のレスポンス例

{
  "success": true,
  "data": [
    {
      "blocks": [
        ["minecraft:stone", [100, 64, 100], {}]
      ],
      "entities": [
        {
          "uuid": "550e8400-e29b-41d4-a716-446655440000",
          "type": "minecraft:boat",
          "x": 100.5,
          "y": 64.0,
          "z": 100.5,
          "yaw": 90.0,
          "pitch": 0.0,
          "nbt": { "Type": "oak" }
        }
      ]
    }
  ]
}

データの構造

ブロックデータ

各ブロックの情報は、以下の順序の配列として表現されます。 [BlockID, [X, Y, Z], Properties]

  • BlockID: ブロックの種類を表す文字列(例: minecraft:lever)。
  • [X, Y, Z]: ブロックの絶対座標を表す数値配列。
  • Properties: ブロックの状態(向き、動力強度、ON/OFF等)を表すオブジェクト(例: {"power": "15", "facing": "north"})。

エンティティデータ (--include-entities 指定時)

各エンティティの情報は、以下のフィールドを持つオブジェクトとして表現されます。

  • uuid: エンティティの一意な識別子。
  • type: エンティティの種類(例: minecraft:boat, minecraft:minecart)。
  • x, y, z: エンティティの座標(小数)。
  • yaw: (任意) 水平方向の向き(度数法)。
  • pitch: (任意) 垂直方向の向き(度数法)。
  • nbt: (任意) エンティティのNBTデータ(例: {"Type": "oak"})。

TIPS

  • レッドストーン回路の解析を行う前に、このスキルを使用して周囲の状況を把握してください。
  • 範囲が広すぎると API のレスポンスが遅くなる可能性があるため、必要な範囲に限定して取得することをお勧めします。
  • 座標引数 (--pos1, --pos2) は "x,y,z" (整数、カンマ区切り) の形式で指定します。
  • 出力データの data フィールドは、count が 1 の場合でも「1回分の実行結果を格納した配列」を含む二次元配列(data[0] が1回目の結果)になります。
  • --include-entities を指定した場合、プレイヤーエンティティ(minecraft:player)は取得対象から除外されます。

--format grid の場合

y 座標ごとに2Dテキストグリッドが出力されます。行は z 座標、列は x 座標です。左上が最小の x, 最小の z に対応します。

実行例

mc-cli get-blocks --pos1 "100,64,100" --pos2 "102,65,102" --format grid

出力例

[y=64]
       x:100 x:101 x:102
z:100    s     .     .
z:101    r     r     .
z:102    .     .     l

[y=65]
       x:100 x:101 x:102
z:100    .     .     .
z:101    .     .     .
z:102    .     .     .

凡例:
s: minecraft:stone
r: minecraft:redstone_wire
l: minecraft:lever
.: minecraft:air

grid形式の読み方

  • s, r, l などの1文字(または2文字以上)は、凡例に対応するブロックIDの短縮表記です。
  • . は空気ブロック(minecraft:air)です。
  • 座標ラベル(x:100, z:100)が付いているため、空間的な配置を直感的に把握できます。
  • 向きや信号強度(power, facing, delay 等)は表示されません。詳細な状態を調べる必要がある場合は、同じ範囲を --format json で再度取得してください。
  • --format grid と --include-entities を同時に指定した場合、エンティティ情報は含まれません。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

レッドストーン回路の自動テストが失敗した際の切り分け・局所修正手順。CLI版の mc-cli get-blocks, interact-block, place-blocks を使ったデバッグ方法を定義する。

The English summary is being prepared. Showing the original description.

yadokari1130/MC-Redstone-AI6Updated Aug 23, 2026

レッドストーン回路の自動テストが失敗した際の切り分け・局所修正手順。get_blocks, interact_block, place_blocks を使ったデバッグ方法を定義する。

The English summary is being prepared. Showing the original description.

yadokari1130/MC-Redstone-AI6Updated Aug 23, 2026

agent 向けテキスト指示(skill / slash command / task プロンプト / CLAUDE.md 節 / コード生成プロンプト)を、バイアスを排した実行者に動かしてもらい、両面(実行者の自己申告 + 指示側メトリクス)で評価して反復改善する手法。改善が頭打ちになるまで回す。プロンプトや skill を新規作成・大幅改訂した直後、またはエージェントの挙動が期待通りにならない原因を指示側の曖昧さに求めたいときに使う。

The English summary is being prepared. Showing the original description.

yadokari1130/MC-Redstone-AI6Updated Aug 23, 2026

Minecraft のレッドストーン回路や構造物を設計するための、JSON データモデルの仕様と設計ガイドラインです。

The English summary is being prepared. Showing the original description.

yadokari1130/MC-Redstone-AI6Updated Aug 23, 2026

CLI版 mc-cli drop-items コマンドの使い方。ホッパーやコンテナに投入するアイテムを世界にドロップする時に読む。

The English summary is being prepared. Showing the original description.

yadokari1130/MC-Redstone-AI6Updated Aug 23, 2026

CLI版 mc-cli fill コマンドの使い方。土台作成や範囲消去(air)を行う前に読む。

The English summary is being prepared. Showing the original description.

yadokari1130/MC-Redstone-AI6Updated Aug 23, 2026

See all skills by yadokari1130

Report a problem with this skill