The new 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?

  • 2
    What part isn't fully documented? It's a potentially complicated command when you start adding data tags, but we can't fix the fact that it's complicated here... – SevenSidedDie Oct 31 '13 at 23:52

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 in

dataTag (optional) is tile entity data.

From Minecraft wiki

  • 1
    Please add the link of which Minecraft wiki you got it from. And there's no need for signatures, so I've removed that from your answer. – Frank Nov 1 '13 at 1:39

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:} .

protected by Community Feb 9 '14 at 21:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.