I would like to command-create a dispenser that contain infinite colored wool.
What I have right now is:
/summon FallingSand ~3 ~1 ~ {TileID:23, Time:1, TileEntityData:{Items:[{id:35, Slot:0}]}}
TileId:23
is the dispenser, and in the Items
, id:35
is the wool, but how can I specify the dataValue I'd like to give to the wool?
Best Answer
To have infinite amount of an item in a dispenser set the count for that item to -1:
To have a data value for an item in the dispenser, for example coloured wool, use the
Data:
tag:Data:0
will make it spawn white wool.You may also want to switch to the
/setblock
command. Here is the same with/setblock
:As you can see it is much smaller. You can also use the new
minecraft:<blockname>
format:If there is already a block there then you might want to change to
break
:I also think that it might eventually run out, so you can fill all the slots with the item, unless you are going to have other items in there as well. This should last a long time though so you should be fine. :D
Hope I helped!