Minecraft:Commands/structure: Difference between revisions
More actions
imported>RedX Replace redirect link |
Fix template calls: add MC/ prefix |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{for|the command {{ | {{for|the command {{MC/In|java}} that can place structures|Commands/place}} | ||
{{ | {{MC/Exclusive|bedrock|education}} | ||
{{Infobox command | {{Infobox command | ||
|name=structure | |name=structure | ||
| Line 7: | Line 7: | ||
}} | }} | ||
Used to save and load structures without having to use | Used to save and load structures without having to use structure blocks. | ||
==Syntax== | ==Syntax== | ||
| Line 21: | Line 21: | ||
==Arguments== | ==Arguments== | ||
{{ | {{MC/Main|Structure Block}} | ||
{{ | {{MC/Argument|be=1|name: string|basic_string}} | ||
: {{ | : {{MC/Arg desc|be=basic_string}} | ||
: Should be in the format of <code>name</code> or <code>namespace:name</code>. If namespace is unspecified, defaults to <code>mystructure:</code> | : Should be in the format of <code>name</code> or <code>namespace:name</code>. If namespace is unspecified, defaults to <code>mystructure:</code> | ||
{{ | {{MC/Argument|be=1|from: x y z|CommandPosition}} and {{MC/Argument|be=1|to: x y z|CommandPosition}} (in <code>save</code> mode) | ||
: Specifies any two opposing corner blocks of the region to be saved. | : Specifies any two opposing corner blocks of the region to be saved. | ||
: {{ | : {{MC/Arg desc|be=CommandPosition}} | ||
{{ | {{MC/Argument|be=1|to: x y z|CommandPosition}} (in <code>load</code> mode) | ||
: Specifies the lower northwest corner of the destination region. | : Specifies the lower northwest corner of the destination region. | ||
: {{ | : {{MC/Arg desc|be=CommandPosition}} | ||
{{ | {{MC/Argument|be=1|saveMode: StructureSaveMode|enum}} | ||
: Specifies the storage location. | : Specifies the storage location. | ||
: Must be one of <code>disk</code> and <code>memory</code>. If not specified, defaults to memory. | : Must be one of <code>disk</code> and <code>memory</code>. If not specified, defaults to memory. | ||
| Line 41: | Line 41: | ||
:<code>memory</code> only saves the structure in memery temporarily. When leaving and rejoining the world, the structure save files are gone. | :<code>memory</code> only saves the structure in memery temporarily. When leaving and rejoining the world, the structure save files are gone. | ||
{{ | {{MC/Argument|be=1|includeEntities: Boolean|enum}} | ||
: Specifies whether including entities or not. If unspecified, defaults to <code>true</code>. | : Specifies whether including entities or not. If unspecified, defaults to <code>true</code>. | ||
: {{ | : {{MC/Arg desc|be=bool}} | ||
{{ | {{MC/Argument|be=1|rotation: Rotation|enum}} | ||
: Specifies the rotation when loading a structure. If unspecified, defaults to <code>0_degrees</code>. | : Specifies the rotation when loading a structure. If unspecified, defaults to <code>0_degrees</code>. | ||
: Must be one of <code>0_degrees</code>, <code>90_degrees</code>, <code>180_degrees</code>, and <code>270_degrees</code>. | : Must be one of <code>0_degrees</code>, <code>90_degrees</code>, <code>180_degrees</code>, and <code>270_degrees</code>. | ||
{{ | {{MC/Argument|be=1|mirror: Mirror|enum}} | ||
: Specifies the axis of mirror flip when loading a structure. If unspecified, defaults to <code>none</code>. | : Specifies the axis of mirror flip when loading a structure. If unspecified, defaults to <code>none</code>. | ||
: Must be one of <code>x</code>, <code>z</code>, <code>xz</code>, and <code>none</code>. | : Must be one of <code>x</code>, <code>z</code>, <code>xz</code>, and <code>none</code>. | ||
{{ | {{MC/Argument|be=1|animationMode: StructureAnimationMode|enum}} | ||
: Specifies the animation to generate structures. | : Specifies the animation to generate structures. | ||
: Must be one of <code>block_by_block</code> and <code>layer_by_layer</code>. | : Must be one of <code>block_by_block</code> and <code>layer_by_layer</code>. | ||
{{ | {{MC/Argument|be=1|animationSeconds: float|float}} | ||
: Specifies the duration of the animation. | : Specifies the duration of the animation. | ||
: {{ | : {{MC/Arg desc|be=float}} | ||
{{ | {{MC/Argument|be=1|includeBlocks: Boolean|enum}} | ||
: Specifies whether including blocks or not. If unspecified, defaults to <code>true</code>. | : Specifies whether including blocks or not. If unspecified, defaults to <code>true</code>. | ||
: {{ | : {{MC/Arg desc|be=bool}} | ||
{{ | {{MC/Argument|be=1|integrity: float|float}} | ||
: Specifies the integrity (probability of each block being loaded). If 100, all blocks in the structure are loaded. If 0, no blocks are loaded. If unspecified, defaults to <code>100</code>. | : Specifies the integrity (probability of each block being loaded). If 100, all blocks in the structure are loaded. If 0, no blocks are loaded. If unspecified, defaults to <code>100</code>. | ||
: {{ | : {{MC/Arg desc|be=float}} Should be between 0 and 100 (inclusive). | ||
{{ | {{MC/Argument|be=1|seed: string|basic_string}} | ||
: Specifies the seed when calculating whether a block should be loaded according to integrity. If unspecified, a random seed is taken. | : Specifies the seed when calculating whether a block should be loaded according to integrity. If unspecified, a random seed is taken. | ||
: {{ | : {{MC/Arg desc|be=basic_string}} | ||
{{ | {{MC/Argument|be=1|waterlogged: Boolean|enum}} | ||
:Specifies whether or not waterlog the blocks when the structure is loaded in water. If unspecified, defaults to <code>false</code>. | :Specifies whether or not waterlog the blocks when the structure is loaded in water. If unspecified, defaults to <code>false</code>. | ||
: {{ | : {{MC/Arg desc|be=bool}} | ||
==Result== | ==Result== | ||
| Line 90: | Line 90: | ||
==Output== | ==Output== | ||
{{Output table|onlybe=1}} | {{MC/Output table|onlybe=1}} | ||
{{Output table|edition=be|On fail|0}} | {{MC/Output table|edition=be|On fail|0}} | ||
{{Output table|On success|1}} | {{MC/Output table|On success|1}} | ||
{{Output table}} | {{MC/Output table}} | ||
== History == | == History == | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|bedrock}} | |{{MC/HistoryLine|bedrock}} | ||
|{{HistoryLine||1.16.100|dev=beta 1.16.100.52|Added {{ | |{{HistoryLine||1.16.100|dev=beta 1.16.100.52|Added {{MC/Cmd|structure|link=none}}.}} | ||
|{{HistoryLine|||dev=beta 1.16.100.60|Added the ability to animate the placement of a structure.}} | |{{MC/HistoryLine|||dev=beta 1.16.100.60|Added the ability to animate the placement of a structure.}} | ||
|{{HistoryLine||1.16.210|dev=beta 1.16.210.54|{{ | |{{HistoryLine||1.16.210|dev=beta 1.16.210.54|{{MC/Cmd|structure|link=none}} now has the ability to delete saved structure files.}} | ||
}} | }} | ||
| Line 109: | Line 109: | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/structure | |||
es:Comandos/structure | |||
ja:コマンド/structure | |||
pt:Comandos/structure | |||
ru:Команды консоли/structure | |||
zh:命令/structure | |||
Latest revision as of 20:14, 9 April 2026
Template:For Script error: No such module "Exclusive". Template:Infobox command
Used to save and load structures without having to use structure blocks.
Syntax
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]- Saves a structure.
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]- Loads a structure.
structure delete <name: string>- Deletes saved structure file.
Arguments
{{#vardefine:params|0 }}Template:Hatnote
name: string: basic_string
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|string}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
- Should be in the format of
nameornamespace:name. If namespace is unspecified, defaults tomystructure:
from: x y z: CommandPosition and to: x y z: CommandPosition (in save mode)
- Specifies any two opposing corner blocks of the region to be saved.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|block_pos}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
to: x y z: CommandPosition (in load mode)
- Specifies the lower northwest corner of the destination region.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|block_pos}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
saveMode: StructureSaveMode: enum
- Specifies the storage location.
- Must be one of
diskandmemory. If not specified, defaults to memory. disksaves the structure to the world database itself. After leaving and rejoining the world, the structure save files is still there.memoryonly saves the structure in memery temporarily. When leaving and rejoining the world, the structure save files are gone.
includeEntities: Boolean: enum
- Specifies whether including entities or not. If unspecified, defaults to
true. - {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|bool}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
rotation: Rotation: enum
- Specifies the rotation when loading a structure. If unspecified, defaults to
0_degrees. - Must be one of
0_degrees,90_degrees,180_degrees, and270_degrees.
mirror: Mirror: enum
- Specifies the axis of mirror flip when loading a structure. If unspecified, defaults to
none. - Must be one of
x,z,xz, andnone.
animationMode: StructureAnimationMode: enum
- Specifies the animation to generate structures.
- Must be one of
block_by_blockandlayer_by_layer.
animationSeconds: float: float
- Specifies the duration of the animation.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|float}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
includeBlocks: Boolean: enum
- Specifies whether including blocks or not. If unspecified, defaults to
true. - {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|bool}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
integrity: float: float
- Specifies the integrity (probability of each block being loaded). If 100, all blocks in the structure are loaded. If 0, no blocks are loaded. If unspecified, defaults to
100. - {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|float}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}} Should be between 0 and 100 (inclusive).
seed: string: basic_string
- Specifies the seed when calculating whether a block should be loaded according to integrity. If unspecified, a random seed is taken.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|string}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
waterlogged: Boolean: enum
- Specifies whether or not waterlog the blocks when the structure is loaded in water. If unspecified, defaults to
false. - {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|bool}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
History
External links
de:Befehl/structure es:Comandos/structure ja:コマンド/structure pt:Comandos/structure ru:Команды консоли/structure zh:命令/structure