TransWikia.com

Please help with Minecraft Command to place dispenser pre-filled with pre-named items

Arqade Asked by Dimonium Anonimo on January 16, 2021

The goal is to plop down a dispenser with a stack of red wool named "testa" and a stack of orange wool named "testb" already in the dispenser inventory. I’ve gotten everything but the name. The weird part is, the command below actually runs, no errors, but it generates a dispenser with a stack of red wool just named "red wool" and likewise for the orange stack.

/setblock ~-3 ~ ~ dispenser[facing=east]{Items:[{Slot:0,id:red_wool,Count:64,tag:{display:{Name:"testa"}}},{Slot:1,id:orange_wool,Count:64,tag:{display:{Name:"testb"}}}]} replace

One Answer

You have to stringify (cancel out) the quotes around the names. You can do this with backslashes (""item_name"") or by placing the double qoutes in a pair of single quotes ('"item_name"').

/setblock ~-3 ~ ~ dispenser[facing=east]{Items:[{Slot:0b,id:"minecraft:red_wool",Count:64b,tag:{display:{Name:""testa""}}},{Slot:1b,id:"minecraft:orange_wool",Count:64b,tag:{display:{Name:""testb""}}}]} replace

Answered by MegaCrafter10 on January 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP