/structure
原文:Commands/structure;源修订:3531326。
Java 版中可放置结构的命令参见 /place。本命令为基岩版和教育版独有,需要开启作弊;权限等级为 1。无需使用结构方块即可保存和加载结构。
语法
保存结构:
structure save <name: string> <from: x y z> <to: x y z> [saveMode: StructureSaveMode]
structure save <name: string> <from: x y z> <to: x y z> [includeEntities: Boolean] [saveMode: StructureSaveMode] [includeBlocks: Boolean]
加载结构:
structure load <name: string> <to: x y z> [rotation: Rotation] [mirror: Mirror] [includeEntities: Boolean] [includeBlocks: Boolean] [waterlogged: Boolean] [integrity: float] [seed: string]
structure load <name: string> <to: x y z> [rotation: Rotation] [mirror: Mirror] [animationMode: StructureAnimationMode] [animationSeconds: float] [includeEntities: Boolean] [includeBlocks: Boolean] [waterlogged: Boolean] [integrity: float] [seed: string]
删除已保存结构文件:
structure delete <name: string>
参数
主条目:结构方块。
| 参数 | 类型 | 说明 |
|---|---|---|
name: string |
basic_string |
应为 name 或 namespace:name 格式;省略命名空间时默认为 mystructure:。 |
from: x y z、to: x y z(save) |
CommandPosition |
指定要保存区域的任意两个对角方块。 |
to: x y z(load) |
CommandPosition |
指定目标区域的西北下角。 |
saveMode: StructureSaveMode |
枚举 | 存储位置,disk 或 memory;省略时为 memory。disk 保存至世界数据库,退出重进后仍在;memory 只临时保存在内存中,退出重进后消失。 |
includeEntities: Boolean |
布尔枚举 | 是否包含实体;默认 true。 |
rotation: Rotation |
枚举 | 加载结构时的旋转,必须为 0_degrees、90_degrees、180_degrees 或 270_degrees;默认 0_degrees。 |
mirror: Mirror |
枚举 | 加载时的镜像翻转轴,必须为 x、z、xz 或 none;默认 none。 |
animationMode: StructureAnimationMode |
枚举 | 生成结构的动画,必须为 block_by_block 或 layer_by_layer。 |
animationSeconds: float |
float |
动画持续时间。 |
includeBlocks: Boolean |
布尔枚举 | 是否包含方块;默认 true。 |
integrity: float |
float |
完整性,即每个方块被加载的概率。100 加载全部方块,0 不加载任何方块;默认 100,范围为 0 至 100(含端点)。 |
seed: string |
basic_string |
按完整性计算是否加载方块时使用的种子;省略时随机选择。 |
waterlogged: Boolean |
布尔枚举 | 结构在水中加载时,是否使方块含水;默认 false。 |
结果与输出
命令不完整或参数指定不正确时无法解析。任一区域未加载或位于世界外;保存区域大于 64 * 384 * 64;加载或删除的结构不存在;加载时 integrity 小于 0 或大于 100,均会失败。其他情况成功。
失败时成功次数为 0,成功时为 1。
外部链接
Microsoft Learn:/structure 命令(2025 年 6 月 25 日)。
来源为 Minecraft Wiki;本中文翻译/改编按 CC BY-NC-SA 3.0 共享。