# 保存した構造物を読み込む（blocks.loadStructure）

> 保存しておいた構造物を、名前を指定して読み込むブロックです。回転や反転もできます。

- カテゴリ：ブロック（blocks）
- ブロック：構造物を読み込む 名前"my structure" 読み込み先~0 ~0 ~0 回転○ 反転○ アニメーション種類○ アニメーション時間（秒）○ エンティティを含む○ ブロックを含む○ 完全性○
- URL：https://makecode.minecraft-okinawa.com/reference/blocks/load-structure/
- Pythonでの名前：blocks.load_structure
- 公式データ取得日：2026-11-13
- 動作確認：確認待ち

## JavaScript

```javascript
blocks.loadStructure("my structure", pos(0, 0, 0))
```

## Python

```python
blocks.load_structure("my structure", pos(0, 0, 0))
```

## 引数

| 名前 | 値 | 意味 |
|---|---|---|
| name | 文字列 |  |
| to | 座標 |  |
| rotation | 数値 |  |
| mirror | 数値 |  |
| animationMode | StructureAnimationMode |  |
| animationSeconds | 数値 |  |
| includeEntities | 真偽値（true / false） |  |
| includeBlocks | 真偽値（true / false） |  |
| integrity | 数値 |  |

## 使用例

### Make a chat command to build a fenced corral that surrounds the player. Fill the corral with some horses. Save the horse corral as a structure so you can load it somewhere in the world later. Make another chat command to load the corral at the player's location but upside down.

```javascript
player.onChat("makecorral", function () {
    blocks.fill(
    SPRUCE_FENCE,
    pos(-20, 0, -20),
    pos(20, 0, 20),
    FillOperation.Outline
    )
    for (let index = 0; index < 10; index++) {
        mobs.spawn(HORSE, randpos(
        pos(-19, 0, -19),
        pos(19, 0, 19)
        ))
    }
    blocks.saveStructure(
    "horse corral",
    pos(-20, 0, -20),
    pos(20, 0, 20)
    )
})
player.onChat("spawncorral", function () {
    blocks.loadStructure(
    "horse corral",
    pos(0, 0, 0),
    DEGREES0,
    Z
    )})
```

```python
def on_on_chat():
    blocks.fill(SPRUCE_FENCE,
        pos(-20, 0, -20),
        pos(20, 0, 20),
        FillOperation.OUTLINE)
    for index in range(10):
        mobs.spawn(HORSE, randpos(pos(-19, 0, -19), pos(19, 0, 19)))
    blocks.save_structure("horse corral", pos(-20, 0, -20), pos(20, 0, 20))
player.on_chat("makecorral", on_on_chat)

def on_on_chat2():
    blocks.load_structure("horse corral", pos(0, 0, 0), DEGREES0, Z)
player.on_chat("spawncorral", on_on_chat2)
```

## 出典

- [MakeCode for Minecraft 公式リファレンス（blocks.loadStructure）](https://minecraft.makecode.com/reference/blocks/load-structure)

執筆：鈴木孝昌（現役プロジェクトマネージャー／マイクラカップ指導者）／運営：沖縄マイクラ部 プログラミングスクール「クロスウェーブ」（https://minecraft-okinawa.com/）