The Minecraft command /setblock is very exciting but poorly documented.
How do I use the command? For example to set a yellow stained glass at a certain location? To create a chest full of enchanted swords?
The Minecraft command /setblock is very exciting but poorly documented.
How do I use the command? For example to set a yellow stained glass at a certain location? To create a chest full of enchanted swords?
Here's the structure of the /setblock
command:
/setblock x y z block data method [dataTag]
xyz
are the coordinates of the block
block
is the TileID of the block (includes id:0 now!)
data
is the block data (i.e. 5:1 spruce wood)
method
is one of three things: keep
, replace
, or delete
keep
spawns the block at the coordinates.replace
replaces the block at the coordinates with the block ID.delete
removes the block at the coordinates and then spawns the new one indataTag
(optional) is tile entity data.
From Minecraft wiki
All I really need to know is a lot about the /setblock
command's DataTags. I just can never figure out new ones. I do know some. Here are a few DataTags that I know, for setblock, summon, and give:
For /give player heads:
/give [player] minecraft:skull 1 3 {SkullOwner:[player]}
For /setblock spawners:
/setblock [x] [y] [z] minecraft:mob_spawner 0 [method] {EntityId:/ID used for //summon/}
For /summon equipment:
/summon [Zombie|Skeleton] [x] [y] [z] {Equipment:[{id:/no. ID of HAND equipped/},{id:/FEET/},{id:/LEGS/},{id:/CHEST/},{id:/HEAD/}]}
On the /summon
one, on the head, I know how to put a player skull on the Zombie or Skeleton, and here is how: What goes in place of {id:[HEAD]}
is {id:397,Damage:3,tag:{SkullOwner:}
.
To make it a player, put a player's Username between the :
and the }
in {SkullOwner:}
.