# 線を作る(shapes.line) > ある位置から別の位置までブロックの線を作ります。 - カテゴリ:図形(shapes) - ブロック:このブロックで線を作成: 草ブロック 開始 ~0 ~0 ~0 終了 ~0 ~0 ~0 - URL:https://makecode.minecraft-okinawa.com/reference/shapes/line/ - 公式データ取得日:2026-11-13 - 動作確認:確認待ち ## JavaScript ```javascript shapes.line( GRASS, pos(0, 0, 0), pos(0, 0, 0) ) ``` ## Python ```python shapes.line(GRASS, pos(0, 0, 0), pos(0, 0, 0)) ``` ## 引数 | 名前 | 値 | 意味 | |---|---|---| | block | ブロック・アイテムの種類 | | | p0 | 座標 | | | p1 | 座標 | | | extrusion | 座標 | | ## 使用例 ### Draw a diagonal line of gold from the player to a position 10 blocks to the East and 10 blocks to the North. ```javascript player.onChat("diag", function () { shapes.line( GOLD_BLOCK, pos(0, 1, 0), pos(10, 1, 10) ) }) ``` ```python def on_on_chat(): shapes.line(GOLD_BLOCK, pos(0, 1, 0), pos(10, 1, 10)) player.on_chat("diag", on_on_chat) ``` ## 出典 - [MakeCode for Minecraft 公式リファレンス(shapes.line)](https://minecraft.makecode.com/reference/shapes/line) 執筆:鈴木孝昌(現役プロジェクトマネージャー/マイクラカップ指導者)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)