A Dispenser is a special redstone powered block. When right-clicked, a menu allows you to place items inside it. Each time the block receives power from a redstone circuit, a random item from its inventory drops out. Dispensers resemble furnaces, but the two blocks have different uses and crafting recipes.
Crafting
| Ingredients | Input » Output |
|---|---|
| Cobblestone + Bow + Redstone Dust |
Template:Grid/Crafting Table |
When placed, the dispenser faces the player (it will dispense items towards where the player is standing). Note that with the addition of damage to bows in 1.0.0, you cannot use a damaged bow to craft a dispenser.
Quick Kits
This idea was popularized by Etho and improved by several other people. This device is used when you die, and you need to get back to the place you died before your dropped items despawns. This equips you will all the essential items you need to venture out to dangerous places without opening several chests to get the items you need and in the example video, the items dispensed are arranged for the player's preferences on the position of the items in the hotkeys and inventory.
Dispensing
Most items placed in a dispenser will simply be ejected as items and land 3 by 3 blocks away if on level ground. Arrows, Splash Potions, Eggs, and Snowballs that are stored inside the dispenser are instead fired out (mostly as if they were right-clicked in your inventory). Arrows fired from a height of 2 above level ground will go anywhere from 10 to 21 blocks away. Arrows will cause damage and can be picked up, unlike those fired from skeletons. Eggs and snowballs break with most of the usual effects. Any projectiles shot by the dispenser do not knockback the mobs that it hits. It is unclear whether this is a bug or not.
Unlike most other redstone devices, it may be triggered by redstone wire placed up to one block adjacent to it as well as running directly into it; therefore a single redstone wire can trigger up to 5 dispensers in a cross pattern. This allows for easy creation of large walls of dispensers.
Another use for dispensers is delaying. Using a single water current and a wooden pressure plate, you can delay a signal up to 11 seconds. The equivalent of this is 28 redstone repeaters, which is quite expensive. An example video can be seen here.
Dispensers are most effectively used offensively with a 5-clock or pulser hooked up to a pressure plate or switch.
It has been found that items in the top left corner come out the least often, and the bottom right is the most common. See below.
When a dispenser dispenses an item, it emits a clicking sound and a puff of smoke. If it is empty when activated, it emits a slightly higher-pitched click.
A dispenser will work if it is placed underwater, even without any blocks touching it by placing a redstone torch underneath it. Also it can be properly wired by placing the redstone in a tunnel underneath the water.
If the face of the dispenser was covered by a block, and the dispenser was facing west or south, fired items would pass through the block. This was fixed in the Beta 1.6 update.
Probability distribution
Currently each stack in the dispenser is picked with equal probability. That is, if there are x stacks in the dispenser, the probability that a particular stack is picked is 1/x. Beware that the distribution isn't weighted by stack size. That skews the distribution of individual items. For example, if there are two stacks in the dispenser, one of 18 dandelions and one of 6 roses, at first dandelions and roses are equally likely. Roses will run out rapidly, after which the distribution abruptly changes to 100% dandelions. Example output:
If each individual item were picked with equal probability, as if each item of a stack were in a different slot, the distribution would stay at roughly 75%/25% even over time. Indeed the output would be a uniform random permutation:
While such behavior is impossible to replicate for anything over 9 items, it can be approximated by splitting stacks such that each stack is fairly small and has the same number of items. For example, three stacks of 6 dandelions will neatly complement the stack of 6 roses. Splitting into stacks of 3 would be even better, since smaller stacks can't retain as much 'undeserved' probability.
Pre-1.6
Items in a dispenser weren't dispensed uniformly. Items in the bottom-right slot were dispensed much more often than items in the top-left slot. This appeared to be due to an oversight in the code.
To find the current erratic probability distribution, first list all non-empty slots in this order:
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
Then pick the column for that number of slots in the following table. The numbers underneath are the approximate probability that the corresponding slot in the list is picked.
| Slot | Slots filled | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
| 1 | 100.0% | 50.0% | 25.0% | 12.5% | 6.3% | 3.1% | 1.6% | 0.8% | 0.4% |
| 2 | 50.0% | 33.3% | 22.2% | 14.8% | 9.9% | 6.5% | 4.4% | 2.9% | |
| 3 | 41.7% | 29.2% | 20.0% | 14.4% | 10.3% | 7.2% | 5.2% | ||
| 4 | 36.1% | 26.2% | 19.2% | 14.0% | 10.3% | 7.6% | |||
| 5 | 32.2% | 24.1% | 18.1% | 13.7% | 10.3% | ||||
| 6 | 29.3% | 22.4% | 17.2% | 13.3% | |||||
| 7 | 27.1% | 21.1% | 16.5% | ||||||
| 8 | 25.3% | 20.0% | |||||||
| 9 | 23.8% | ||||||||
History
When dispensers were introduced, mining a dispenser destroyed the items inside. This was fixed in the 1.6 update and mining a dispenser now drops all of the items inside just like mining a chest.
Bugs
- In the 1.8 and 1.8.1 versions, shift clicking items out of a dispenser in a server would cause the server to crash.
- If a player is killed by an arrow from a dispenser, the server will crash with a NullPointerException.
- If a redstone torch is placed directly above, below, or adjacent to the dispenser, the dispenser will fire twice every time it is powered and un-powered by another input.
- Dispensers cannot be crafted with damaged bows.
Trivia
- The Dispenser uses the same texture as the Furnace on all sides except the face, which has a unique texture.
- Interestingly, the texture file for the dispenser menu is named "trap.png", possibly because it was originally designed for making arrow traps.
- It is possible to make a very simple dispensing mechanism by attempting to place a stone button on the floor in front of a dispenser. Because the button cannot go on the floor, it will default to the dispenser, creating a dispenser which can simply be clicked to receive items, but cannot be tripped by mobs. (Fixed in Beta 1.6)
- If a redstone torch is placed on one side of the dispenser, and a redstone wire on the opposite side, the dispenser will activate.
- You can use dispensers to delay Redstone circuits by intervals of five minutes, hook up a wooden pressure-plate to an i/o reverse then to a dispenser and put a item onto it. when the item vanishes then the Redstone charge will change state.
- Although arrows, snowballs, and eggs are actually fired, TNT is merely dropped as an item so it is not possible to use dispensers to create a TNT cannon.
- Notch said that he fixed the dispenser texture being off by one pixel in Beta 1.6.
- If a player is killed by arrows fired from a dispenser in SMP, a message will appear saying "[Player name] was shot by Arrow"
- DispenserGlitch.png
Arrows being fired through a Solid Block placed directly in front of a Dispenser.
- Dispensertrap.jpg
A picture showing a Dispenser Trap with a hidden Redstone circuit.
- 8x8dispenserwallwiring.png
An example of the wiring for an 8x8 wall of dispensers, using the cross pattern activation.
- Dispenserspread.jpg
The spread after dispensing a number of blocks.
