Minecraft wiki entry for Defense, associated text: A good, fast machine gun requires one sticky piston, four redstone blocks, one slime block, and four dispensers. Place the sticky piston horizontally and the slime block on the head. Take the redstone blocks and place them on the sides, top, and bottom of the slime block, but not the front. Then go one block forward and place your dispensers. Activating the piston causes a redstone update, causing the piston to go to and fro VERY quickly due to quasi-connectivity. It fires off a stack of ammo in less than a minute. Please note that you cannot turn it off, unless you keep it constantly on by placing a torch on the back.