Minecraft:Commands/summon: Difference between revisions
From SAS Gaming Wiki
More actions
imported>NRPAN1 |
Remove broken links to missing pages |
||
| Line 4: | Line 4: | ||
* 2 {{only|java|short=1}} | * 2 {{only|java|short=1}} | ||
* 1 {{only|bedrock|short=1}} | * 1 {{only|bedrock|short=1}} | ||
| others = | | others = Cheat only{{only|bedrock|short=1}} | ||
}} | }} | ||
Summons an | Summons an entity. | ||
==Syntax== | ==Syntax== | ||
| Line 25: | Line 25: | ||
: Specifies the entity to be summoned. | : Specifies the entity to be summoned. | ||
: {{arg desc|je=resource|registry=minecraft:entity_type|be=enum}} | : {{arg desc|je=resource|registry=minecraft:entity_type|be=enum}} | ||
: {{IN|java}}, player and | : {{IN|java}}, player and fishing bobber entity cannot be summoned. Commands trying to summon them always fail. | ||
: {{IN|bedrock}}, only certain entity types are allowed to be summoned. Entity types that are allowed to be summoned are listed in the auto-completion suggestion list. Commands trying to summon an entity that cannot be summoned are unparseable. | : {{IN|bedrock}}, only certain entity types are allowed to be summoned. Entity types that are allowed to be summoned are listed in the auto-completion suggestion list. Commands trying to summon an entity that cannot be summoned are unparseable. | ||
| Line 33: | Line 33: | ||
{{el|je|short=1}}: {{argument|nbt|nbt_compound_tag}} | {{el|je|short=1}}: {{argument|nbt|nbt_compound_tag}} | ||
: Specifies the [[Minecraft:Commands#Data tags|data tag]] for the entity, this can include any | : Specifies the [[Minecraft:Commands#Data tags|data tag]] for the entity, this can include any NBT in Entity format. | ||
: {{arg desc|je=nbt_compound_tag}} | : {{arg desc|je=nbt_compound_tag}} | ||
| Line 84: | Line 84: | ||
* ''Java Edition'': | * ''Java Edition'': | ||
** To summon a | ** To summon a charged creeper at the current position named "Powered Creeper": | ||
*** <code> summon creeper ~ ~ ~ {powered:true,CustomName:'"Powered Creeper"'}</code> | *** <code> summon creeper ~ ~ ~ {powered:true,CustomName:'"Powered Creeper"'}</code> | ||
*** NOTE: CustomName is a | *** NOTE: CustomName is a raw JSON text. | ||
**To summon an unbreakable [[Minecraft:Diamond Pickaxe|diamond pickaxe]]: | **To summon an unbreakable [[Minecraft:Diamond Pickaxe|diamond pickaxe]]: | ||
***<code><nowiki> summon item ~ ~ ~ {Item:{id:"minecraft:diamond_pickaxe",count:1,components:{"minecraft:unbreakable":{}}}}</nowiki></code> | ***<code><nowiki> summon item ~ ~ ~ {Item:{id:"minecraft:diamond_pickaxe",count:1,components:{"minecraft:unbreakable":{}}}}</nowiki></code> | ||
** To summon a | ** To summon a spider jockey: | ||
***<code>summon spider ~ ~ ~ {Passengers:[{id:"minecraft:skeleton",HandItems:[{id:"minecraft:bow",count:1}]}]}</code> | ***<code>summon spider ~ ~ ~ {Passengers:[{id:"minecraft:skeleton",HandItems:[{id:"minecraft:bow",count:1}]}]}</code> | ||
** To summon an | ** To summon an evoker rotated -90° to face east without AI: | ||
*** <code>summon evoker ~ ~ ~ {Rotation:[-90f,0f],NoAI:1}</code> | *** <code>summon evoker ~ ~ ~ {Rotation:[-90f,0f],NoAI:1}</code> | ||
** To summon a [[Minecraft:villager]] that trades 1 dirt block in exchange for 5 diamonds: | ** To summon a [[Minecraft:villager]] that trades 1 dirt block in exchange for 5 diamonds: | ||
***<code><nowiki>summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"minecraft:dirt",count:1},sell:{id:"minecraft:diamond",count:5},rewardExp:false}]}}</nowiki></code> | ***<code><nowiki>summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"minecraft:dirt",count:1},sell:{id:"minecraft:diamond",count:5},rewardExp:false}]}}</nowiki></code> | ||
** To summon a baby [[Minecraft:zombie]] that has the Speed II | ** To summon a baby [[Minecraft:zombie]] that has the Speed II mob effect with infinite duration: | ||
***<code>summon zombie ~ ~ ~ {IsBaby:true,active_effects:[{id:"minecraft:speed",amplifier:1b,duration:-1,show_particles:true}]}</code> | ***<code>summon zombie ~ ~ ~ {IsBaby:true,active_effects:[{id:"minecraft:speed",amplifier:1b,duration:-1,show_particles:true}]}</code> | ||
** To summon a glowing | ** To summon a glowing Primed TNT 5 blocks forward, that will explode in 30 seconds but will not deal any damage to blocks or entities: | ||
***<code>summon tnt ^ ^ ^5 {Glowing:true,fuse:600s,explosion_power:0.0f}</code> | ***<code>summon tnt ^ ^ ^5 {Glowing:true,fuse:600s,explosion_power:0.0f}</code> | ||
* ''Bedrock Edition'': | * ''Bedrock Edition'': | ||
** To summon a | ** To summon a patrol captain pillager at the current position: | ||
*** <code>summon pillager ~ ~ ~ ~ ~ minecraft:spawn_as_patrol_captain</code> | *** <code>summon pillager ~ ~ ~ ~ ~ minecraft:spawn_as_patrol_captain</code> | ||
** To summon a | ** To summon a dolphin with the name "Dolphin" in a golden color: | ||
*** <code>summon dolphin §6Dolphin ~ ~ ~</code> | *** <code>summon dolphin §6Dolphin ~ ~ ~</code> | ||
** To summon a [[Minecraft:boat]] rotated 180 degrees: | ** To summon a [[Minecraft:boat]] rotated 180 degrees: | ||
| Line 113: | Line 113: | ||
|{{HistoryLine|java}} | |{{HistoryLine|java}} | ||
|{{HistoryLine||1.7.2|dev=13w36a|Added {{cmd|summon|link=none}}.}} | |{{HistoryLine||1.7.2|dev=13w36a|Added {{cmd|summon|link=none}}.}} | ||
|{{HistoryLine||1.8|dev=14w30a|{{cmd|summon|link=none}} can now spawn | |{{HistoryLine||1.8|dev=14w30a|{{cmd|summon|link=none}} can now spawn lightning.}} | ||
|{{HistoryLine||1.16|dev=20w06a|{{cmd|summon|link=none}} now cannot summon an entity with a position where <x> or <z> exceeds the range of [-30000000, 30000000), or <y> exceeds the range of [-20000000, 20000000)}} | |{{HistoryLine||1.16|dev=20w06a|{{cmd|summon|link=none}} now cannot summon an entity with a position where <x> or <z> exceeds the range of [-30000000, 30000000), or <y> exceeds the range of [-20000000, 20000000)}} | ||
|{{HistoryLine|||dev=20w11a|{{cmd|summon|link=none}} now gives permission to summon | |{{HistoryLine|||dev=20w11a|{{cmd|summon|link=none}} now gives permission to summon Fireball.}} | ||
|{{HistoryLine||1.19.3|dev=22w42a|{{cd|<entity>}} now accepts a [[Minecraft:argument types|<code>resource</code> argument]], instead of <code>entity_summon</code>.}} | |{{HistoryLine||1.19.3|dev=22w42a|{{cd|<entity>}} now accepts a [[Minecraft:argument types|<code>resource</code> argument]], instead of <code>entity_summon</code>.}} | ||
|{{HistoryLine||1.21.9|dev=25w31a|The command now fails when trying to summon monsters while the difficulty is set to Peaceful.}}}} | |{{HistoryLine||1.21.9|dev=25w31a|The command now fails when trying to summon monsters while the difficulty is set to Peaceful.}}}} | ||
| Line 136: | Line 136: | ||
{{Navbox commands}} | {{Navbox commands}} | ||
de:Befehl/summon | |||
es:Comandos/summon | |||
fr:Commandes/summon | |||
ja:コマンド/summon | |||
uk:Команди_консолі/summon | |||
pt:Comandos/summon | |||
ru:Команды консоли/summon | |||
zh:命令/summon | |||
Revision as of 15:45, 9 April 2026
Summons an entity.
Syntax
- Java Edition
summon <entity> [<pos>] [<nbt>]
- Bedrock Edition
summon <entityType: EntityType> [spawnPos: x y z] [yRot: value] [xRot: value] [spawnEvent: string] [nameTag: string]summon <entityType: EntityType> <nameTag: string> [spawnPos: x y z]summon <entityType: EntityType> [spawnPos: x y z] facing <lookAtEntity: target> [spawnEvent: string] [nameTag: string]summon <entityType: EntityType> [spawnPos: x y z] facing <lookAtPosition: x y z> [spawnEvent: string] [nameTag: string]
Arguments
- Specifies the entity to be summoned.
- Template:Arg desc
- Template:IN, player and fishing bobber entity cannot be summoned. Commands trying to summon them always fail.
- Template:IN, only certain entity types are allowed to be summoned. Entity types that are allowed to be summoned are listed in the auto-completion suggestion list. Commands trying to summon an entity that cannot be summoned are unparseable.
- Specifies the position to summon the entity. If not specified, defaults to the position of the command's execution.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the data tag for the entity, this can include any NBT in Entity format.
- Template:Arg desc
Template:El: Template:Argument and Template:Argument
- Specifies the rotation of the summoned entity.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the entity to make the summoned entity facing to.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the coordinates to make the summoned entity facing to.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the in-game event for the entity. Should be a Minecraft:spawn event (event name for entities in behavior pack).
- Template:Arg desc
Template:El: Template:Argument
- Specifies the name of the entity.
- Template:Arg desc
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 Template:Result table Template:Result table
Output
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
Examples
- To summon lightning 10 blocks west of the current position of the executing player:
summon lightning_bolt ~-10 ~ ~
- Java Edition:
- To summon a charged creeper at the current position named "Powered Creeper":
summon creeper ~ ~ ~ {powered:true,CustomName:'"Powered Creeper"'}- NOTE: CustomName is a raw JSON text.
- To summon an unbreakable diamond pickaxe:
summon item ~ ~ ~ {Item:{id:"minecraft:diamond_pickaxe",count:1,components:{"minecraft:unbreakable":{}}}}
- To summon a spider jockey:
summon spider ~ ~ ~ {Passengers:[{id:"minecraft:skeleton",HandItems:[{id:"minecraft:bow",count:1}]}]}
- To summon an evoker rotated -90° to face east without AI:
summon evoker ~ ~ ~ {Rotation:[-90f,0f],NoAI:1}
- To summon a Minecraft:villager that trades 1 dirt block in exchange for 5 diamonds:
summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"minecraft:dirt",count:1},sell:{id:"minecraft:diamond",count:5},rewardExp:false}]}}
- To summon a baby Minecraft:zombie that has the Speed II mob effect with infinite duration:
summon zombie ~ ~ ~ {IsBaby:true,active_effects:[{id:"minecraft:speed",amplifier:1b,duration:-1,show_particles:true}]}
- To summon a glowing Primed TNT 5 blocks forward, that will explode in 30 seconds but will not deal any damage to blocks or entities:
summon tnt ^ ^ ^5 {Glowing:true,fuse:600s,explosion_power:0.0f}
- To summon a charged creeper at the current position named "Powered Creeper":
- Bedrock Edition:
- To summon a patrol captain pillager at the current position:
summon pillager ~ ~ ~ ~ ~ minecraft:spawn_as_patrol_captain
- To summon a dolphin with the name "Dolphin" in a golden color:
summon dolphin §6Dolphin ~ ~ ~
- To summon a Minecraft:boat rotated 180 degrees:
summon boat ~ ~ ~ 180 180
- To summon a patrol captain pillager at the current position:
History
Java Edition
Bedrock Edition
External links
de:Befehl/summon es:Comandos/summon fr:Commandes/summon ja:コマンド/summon uk:Команди_консолі/summon pt:Comandos/summon ru:Команды консоли/summon zh:命令/summon