Dispensers are special blocks powered by redstone. If right clicked, a menu with 9 slots will popup. That is were you can put items that it will shoot/drop. Each time when it gets activated by redstone circuitry or trapped chest, it drops a random item from it’s inventory. Dispensers resemble furnaces and droppers, but all three blocks have different uses and crafting recipes. Furnaces cook food and ores, but droppers only drop things. They have no exceptions, like dispensers do.
Dispenser’s blast resistance equals 17.5, and hardness is 3.5. It is renewable and stackable(64) and can be mined with a wooden pickaxe or better. Dispensers first appeared in 1.2 Beta. It’s decimal ID number is 23. They can dispense liquids and suck them in only if an empty bucket is placed in their inventory.
What do they do
The exact action of a dispenser depends on the items contained in it. It’s default action is to eject items 3 by 3 blocks away if on level ground. There are some exceptions.
Exception 1. Heads and pumpkins will be placed in the front of the dispenser, rendering them unable to drop more items.
Exception 2. Command blocks will be placed with commands entered in them.
a) Arrows, Fire Charges, Chicken Eggs, Snowballs, Splash Potions, Bottles o’ Enchanting, and Firework Rockets are fired out like the right-click action of the items carried by a player.
b) Arrows fire from block height 2 and above will be fired 10 to 21 blocks away from the dispenser.
c) Chicken eggs and snowballs break with most of the usual effects. If they hit a mob they will only inflict damage but not knock the mob back; it is unclear is it a bug or not.
d) Fire Charges will become fireballs of the same type as Blaze fireballs and will continue in a straight line (though the line may be at an angle from the dispenser). Upon being dispensed, the fire charge will make the same sound as Blazes and Ghasts when they launch their projectile. However if used by the player, it makes the same sound as Flint and Steel.
e) Spawn Eggs will result in the corresponding mob being created with its feet in the block directly in front of the dispenser, with no initial velocity.
f) Minecarts and Boats will be placed (as their entity form), but only if the dispenser is placed above water (for boats) or on a rail (for minecarts).
g) Water and lava buckets will place water and lava source blocks. Water and lava source blocks will also be taken if there is an empty bucket inside. Water won’t be placed if the dispenser is in Nether.
h) TNT will be placed and ignited with no obvious forward velocity. However, when they are dispensed, they may be moving at a very small rate in a random direction before falling straight down. Thus, if you try to drop TNT using a dispenser above a one block by one block hole, the TNT will have a good chance of narrowly missing the hole. Because of this, extra caution must be used in delicate machines requiring TNT and dispensers nad player should try to make 2×2 hole.
i) Flint and Steel will ignite fire in front of the dispenser consuming one durability.
j) Bone Meal will be used on the crops it is pointing at.
k) Armor will be equipped on a player from 1 block away.
How they dispense/shoot items
All dispensed items drop in random direction. When a dispenser drops an item it emits a clicking sound. If it’s inventory is empty and is triggered, it emits the same sound at a higher pitch.
They work underwater, but are activated only by placing a redstone torch next to them. A mob killed by a dispenser won’t drop any XP. Dispenser is also triggered by placing and opening a trapped chest next to it. They naturally spawn only in jungle temples with bunch of arrows in them.
My opinion on dispensers: I use them mostly for creating effective traps and for shooting arrows or fireballs from a hidden place. They can be well used for securing a hidden base, for instance. Someone enters your base and gets shot by a bunch of arrows, fireballs and eggs.