Minecraft wiki entry for Defense, associated text: Now connect the arrow dispenser to a redstone comparator which is the input of a redstone torch NOT circuit which then connects to a command block with the /replaceitem command, which finally replaces more arrows in the arrow dispenser.