ビルダーで構造物の記録を始める builder.startStructure

ビルダー公式データ取得日:2026年11月13日Python:builder.start_structure動作確認待ち

ひとことで言うと

構造物の建築を開始する。この後ブロックを使って置いたり、範囲を埋めたり、線を引いたりすると構造物の範囲として自動的に認識される。「構造物として保存する」を使ってメモリに保存し、「構造物を読み込む」を使ってすぐに再建築することができる。

ブロックとコード

ブロックの文言は公式の日本語版に合わせています(形は簡易表示です)。

使用例

This example constructs a 3x3x3 cube with random colors of concrete as a structure and then pastes that structure to create an even bigger cube.

JavaScript

player.onChat("cube", function () {
    builder.teleportTo(pos(0, 0, 0))
    builder.move(FORWARD, 5)
    builder.setOrigin()
    builder.startStructure()
    for (let index = 0; index < 3; index++) {
        for (let index = 0; index < 3; index++) {
            for (let index = 0; index < 3; index++) {
                builder.place([
                LIGHT_BLUE_CONCRETE,
                LIME_CONCRETE,
                PINK_CONCRETE,
                ORANGE_CONCRETE
                ]._pickRandom())
                builder.move(FORWARD, 1)
            }
            builder.move(RIGHT, 1)
            builder.move(BACK, 3)
        }
        builder.move(LEFT, 3)
        builder.move(UP, 1)
    }
    builder.saveStructure("cube")
    builder.teleportToOrigin()
    builder.move(FORWARD, 10)
    builder.move(LEFT, 4)
    for (let index = 0; index < 3; index++) {
        for (let index = 0; index < 3; index++) {
            for (let index = 0; index < 3; index++) {
                builder.loadStructure("cube")
                builder.move(FORWARD, 4)
            }
            builder.move(RIGHT, 4)
            builder.move(BACK, 12)
        }
        builder.move(LEFT, 12)
        builder.move(UP, 4)
    }
})

Python

def on_on_chat():
    builder.teleport_to(pos(0, 0, 0))
    builder.move(FORWARD, 5)
    builder.set_origin()
    builder.start_structure()
    for index in range(3):
        for index2 in range(3):
            for index3 in range(3):
                builder.place([LIGHT_BLUE_CONCRETE,
                    LIME_CONCRETE,
                    PINK_CONCRETE,
                    ORANGE_CONCRETE]._pick_random())
                builder.move(FORWARD, 1)
            builder.move(RIGHT, 1)
            builder.move(BACK, 3)
        builder.move(LEFT, 3)
        builder.move(UP, 1)
    builder.save_structure("cube")
    builder.teleport_to_origin()
    builder.move(FORWARD, 10)
    builder.move(LEFT, 4)
    for index4 in range(3):
        for index5 in range(3):
            for index6 in range(3):
                builder.load_structure("cube")
                builder.move(FORWARD, 4)
            builder.move(RIGHT, 4)
            builder.move(BACK, 12)
        builder.move(LEFT, 12)
        builder.move(UP, 4)
player.on_chat("cube", on_on_chat)
執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにMakeCodeを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む