How can I make a dispenser that has unlimited arrows?

I want to know how to make a dispenser that can throw an infinite amount of arrows. I want to use this for my base.

Is it possible? If so how can I do it?


The replaceitem command is what you're looking for. It can add items directly to chests/dispensers/etc.

replaceitem block [x] [y] [z] [slot] [item] [amount] [data] [dataTag]

x,y,z should be the position of the block. Tilde notation can be used to specify a block relative to the command block

Slot refers to the slot being filled. It needs to be in the form slot.container.x

Item refers to the item, so it should be minecraft:arrow

Amount refers to the number

Data and dataTag refer to extra info about the item. Arrows don't have these values- they would be necessary if, for example, you wanted to pelt people with spruce saplings.

So the command to reload the dispenser above a command block with two arrows would be:

replaceitem block ~ ~1 ~ slot.container.0 minecraft:arrow 2

Make sure this command is on the same circuit and fires when the dispenser does.


You asked to have this for your base so I assume your playing survival. In survival there is no way to do this without hacks or other third party materials, but there is a way to get pretty close to infinite arrows in a dispenser. What you would want to do is have a dispenser attached to a bunch of hoppers filled with arrows like this:enter image description here .The arrows in the hoppers will automatically refill the dispenser when arrows are shot. You can have the dispensers attached in any way you want it doesn't need to be sidewards.