1

I am trying to use the setblock command to place a chest with a sunflower named 'jumping joy' in it. This is the command that I am using:

/setblock ~2 ~2 ~ minecraft:chest 0 destroy{Items:[id:175'Count:1,Slot:0,tag:{Name:"jumping joy"}}}]} 

but it keeps saying Invalid tag encountered, expected '{' as first char.

What am I doing wrong here?

2
  • 2
    You'd need a space between "destroy" and your nbt tag at least
    – Unionhawk
    Aug 13, 2016 at 1:05
  • As of 1.8 (i think, could be 1.7) item IDs have changed. Instead of 'id:175' you would now use 'id:double_plant'. You may need to use the 'Damage:' tag to determine the type of doubleplant it is, as i believe that double grass is the generic item in this situation Dec 8, 2016 at 6:48

1 Answer 1

1

There are a couple things wrong with this.

/setblock ~2 ~2 ~ minecraft:chest 0 destroy{Items:[id:175'Count:1,Slot:0,tag:{Name:"jumping joy"}}}]} 

For one thing, there's no space after "destroy". Next, tag:{Name:"jumping joy"} is not the syntax to name an item. You'll need to use tag:{display{Name:"jumping joy"}} for that. Next, you have a single quote instead of a comma after id:175. Lastly, you should not be using numerical item ID's if you're in version 1.8 or later. They're depreciated in 1.8, and removed in 1.9 and upwards.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .