Minecraft Commands – How to Place a Player Skull with `/setblock` Command

minecraft-commandsminecraft-java-edition

I was doing a mirror project in Minecraft, when I ran into this problem. I'm trying to use a command that will place a player's head in the given coordinates. All of it worked, except that instead of placing a player's head, it placed a normal skeleton skull. How do I fix this command? Here's the command I placed:

/setblock -1393 66 1704 minecraft:skull 1 3 {SkullOwner:"Illeloria"}

Best Answer

Unlike the item variant for skulls, the metadata value for the skull block does not determine type, instead specifying directional facing. The SkullType tag determines the type of skull.

Also unlike the item variant, the player information is not stored in a tag called SkullOwner. You'll want to use ExtraType instead, which transforms into the relevant Owner compound (see here for a description of that format).

/setblock -1393 66 1704 minecraft:skull 1 0 {ExtraType:"Illeloria",SkullType:3}