0

I want to make a randomizer but I don't know how to /setblock a dispenser that is automatically triggered. This is the command I used:

execute @e[type=armor_stand,name=XZChunk] ~ ~ ~ setblock ~ ~ ~ dispenser 1 replace {Triggered:1b,Items:[{Slot:0,id:"minecraft:wool",Count:1,Damage:0},{Slot:1,id:"minecraft:wool",Count:1,Damage:1},{Slot:2,id:"minecraft:wool",Count:1,Damage:2},{Slot:3,id:"minecraft:wool",Count:1,Damage:3},{Slot:4,id:"minecraft:wool",Count:1,Damage:4},{Slot:5,id:"minecraft:wool",Count:1,Damage:5},{Slot:6,id:"minecraft:wool",Count:1,Damage:6},{Slot:7,id:"minecraft:wool",Count:1,Damage:7},{Slot:8,id:"minecraft:wool",Count:1,Damage:8}]}

It works but it doesn't drop any item. Does anyone know what I'm doing wrong?

1 Answer 1

1

This can't be done like you imagine it. Firstly, there is no "Triggered" tag.

You have to set the dispenser and then set something that activates it, like a redstone block. Afterwards you can remove it again.
If you don't know what's at that position before, you could for example clone it to height 255 before and then move it back.

You must log in to answer this question.

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