To have infinite amount of an item in a dispenser set the count for that item to -1:
/summon FallingSand ~3 ~1 ~ {TileID:23, Time:1, TileEntityData:{Items:[{id:35, Slot:0, Count:-1}]}}
To have a data value for an item in the dispenser, for example coloured wool, use the Data:
tag:
/summon FallingSand ~3 ~1 ~ {TileID:23, Time:1, TileEntityData:{Items:[{id:35, Slot:0, Count:-1,Data:0}]}}
Data:0
will make it spawn white wool.
You may also want to switch to the /setblock
command. Here is the same with /setblock
:
/setblock ~3 ~1 ~0 23 keep {Items:[{id:35, Slot:0, Count:-1,Data:0}]}
As you can see it is much smaller. You can also use the new minecraft:<blockname>
format:
/setblock ~3 ~1 ~0 minecraft:dispenser keep {Items:[{id:35, Slot:0, Count:-1,Data:0}]}
If there is already a block there then you might want to change to break
:
/setblock ~3 ~1 ~0 minecraft:dispenser break {Items:[{id:35, Slot:0, Count:-1,Data:0}]}
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!
What you are asking for isn't a simple /fill
, but a system that can generate a cube of stone filled with ores. Imagine the cube just being a bunch of stacked layers that each have been randomly filled with ores.
Summon an armorstand in the bottom corner at the -x -z side of the mine and name it `Layer
/summon ArmorStand x y z {CustomName:Layer,NoGravity:1,Invisible:1,Marker:1}
This will be the pointer of the current layer.
We will also need some armorstands to mark the ores
/execute @e[type=ArmorStand,name=Layer] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:Ore,NoGravity:1,Invisible:1,Marker:1}
You can name some of the armorstands GoldOre
or DiamondOre
ect for diffrent ores (The more armorstands summoned, the more ores per layer)
We will first of all fill the layer with stone. (our mine will be 11*11 in this example)
/execute @e[type=ArmorStand,name=Layer] ~ ~ ~ fill ~ ~ ~ ~10 ~ ~10 stone
now spread the armorstands randomly along the layer
/execute @e[type=ArmorStand,name=Layer] ~ ~ ~ spreadplayers ~5.5 ~5.5 0 5 false @e[type=ArmorStand,r=2,name=!Layer]
make the Ore armorstands place some ores below them (do this for all ore types)
/execute @e[type=ArmorStand,name=Ore] ~ ~ ~ setblock ~ ~-1 ~ coal_ore
Tp The ore armorstands to Layer
/tp @e[type=ArmorStand,name=Ore] @e[type=ArmorStand,name=Layer]
and finally tp Layer
one block up and repeat
/tp @e[type=ArmorStand,name=Layer] ~ ~1 ~
Best Answer
For black wool:
The value after the block type is its data value, which is 15 for back wool.
For oak planks