Share

Share

Dispenser

From Minecraft Wiki
Jump to: navigation, search
[edit]Dispenser
Dispenser.png
Dispenser
Type

Block

Requirements

None

Physics

No

Transparency

No

Luminance

No

Blast resistance

17.5

Hardness

3.5

Tool

A wooden pickaxe or better is required to mine this block

Renewable

Yes

Stackable

Yes (64)

Flammable

No

First appearance

Beta 1.2

Tile Entity ID

Trap

Data value

dec: 23 hex: 17 bin: 10111

Name

dispenser

A dispenser is a solid block which can be used as a redstone component to dispense items.

Obtaining[edit]

Dispensers can be crafted, and are naturally generated in jungle temples.

Crafting[edit]

Ingredients Crafting recipe Description

Cobblestone +
Bow +
Redstone

Cobblestone Cobblestone Cobblestone Grid layout Arrow (small).png Dispenser
Cobblestone Bow Cobblestone
Cobblestone Redstone Cobblestone

The bow must not be damaged to craft the dispenser.

Natural generation[edit]

A single dispenser is naturally generated in every jungle temple.

Usage[edit]

A dispenser can be used as a container or as a redstone component.

To place a dispenser, use it while pointing at a surface adjacent to the space it should occupy. A dispenser can be placed so that its output faces in any direction, including up or down. When placed, a dispenser will face towards the player placing it.

To remove a dispenser, attack it. A dispenser takes up to 2.625 seconds to remove with a pickaxe and will drop itself as an item. If removed by hand, it takes 17.5 seconds and the dispenser will not drop itself as an item.

Dispensers cannot be moved by pistons, and water and lava will flow around a dispenser.

Container[edit]

The dispenser GUI.

A dispenser has 9 slots of inventory space.

To open the dispenser GUI, use the Use Item/Place Block control. To move items between the dispenser inventory and the player inventory or hotbar while the dispenser GUI is open, drag or shift-click the items. To exit the dispenser GUI, use the Esc control.

By default, the GUI of a dispenser is labeled "Dispenser". A dispenser's GUI label can be changed by naming the dispenser in an anvil before placing it, or by using the blockdata command. For example, to label a dispenser at (0,64,0) "Alice's Dispenser", use blockdata 0 64 0 {CustomName:"Alice's Dispenser"}.

A dispenser can be "locked" by setting the dispenser's Lock tag. If a dispenser's Lock tag is not blank, the dispenser cannot be accessed except by players holding an item with the same name as the Lock tag's text. A dispenser's Lock tag can be set or unset with the blockdata command. For example, to lock a dispenser at (0,64,0) with the text "Alice's Key", so that only players holding an item named "Alice's Key" can access the dispenser, use blockdata 0 64 0 {Lock:"Alice's Key"}.

Redstone component[edit]

See also: Redstone circuit

A dispenser can be used to randomly dispense its contents.

Activation
A dispenser is a redstone mechanism and can be activated by:
  • an adjacent active power component: for example, a redstone torch (except that a redstone torch will not activate a dispenser it is attached to), a block of redstone, a daylight sensor, etc.
  • an adjacent powered opaque block (for example, a block with an active redstone torch under it)
  • a powered redstone repeater or redstone comparator facing the dispenser
  • powered redstone dust configured to point at the dispenser, or on top of it, or a directionless "dot" next to it; a dispenser is not activated by adjacent powered redstone dust which is configured to point in another direction.
Some of these methods can activate a dispenser (in the sense of triggering an action) without actually powering the dispenser (in the sense of whether the dispenser will power adjacent redstone dust, etc.).
In addition to the methods above, a dispenser can also be activated by quasi-connectivity (aka "connectivity" or "indirect power"). A dispenser will be activated if one of the methods above would activate a mechanism component in the block above the dispenser, even if there is no mechanism component there (even if the block above the dispenser is air or a transparent block), but only when the dispenser receives a block update (including a redstone update within two blocks of the dispenser).
A dispenser will not activate if it has been less than 1 redstone tick (0.1 seconds, barring lag) since its last activation ended.
Behavior
When activated, a dispenser waits 2 redstone ticks (4 game ticks, or 0.2 seconds barring lag) and then ejects one item. If multiple slots are occupied by items, a random occupied slot will be chosen for ejection. The slot is chosen when an item is ejected, not when the dispenser is initially activated, thus it is possible to move items into or out of a dispenser between its activation and item dispensing.
If the dispenser is facing a container, the ejected item will be transferred into the container. Otherwise, the effects of being activated vary with the type of ejected item. Most items will simply be thrown in the direction the dispenser is facing, as if a player had used the Drop Item control. Other items will behave differently when dispensed:
Dispenser Behavior
Item Effect

Armor
Equips on a player within a one-block distance (any armor, made from any material).

Arrow
Fired in the direction the dispenser is facing, as if the player had right-clicked a bow in their inventory.

Boat
Placed as entity (i.e., a right-clickable vehicle) in the block the dispenser is facing, if the dispenser is facing water or an empty block above water — otherwise dropped.

Bone Meal
Increments the growth stage of carrots, cocoa pods, crops, melon stems, potatoes, pumpkin stems, and saplings the dispenser is facing; grows grass, dandelions, and roses, if the dispenser is facing a grass block; grows a huge brown mushroom if facing a brown mushroom.

Bottle o' Enchanting


Egg


Firework Rocket


Snowball


Splash Potion
Thrown in the direction the dispenser is facing, as if the player had right-clicked the item in their inventory.

Bucket
Collects lava or water the dispenser is facing (replacing the empty bucket in the dispenser with a lava or water bucket) — otherwise dropped.

Command block
Placed as a block, and activated (it will run its command). If the command block item has a BlockEntityTag, that tag will be used to create the command block's tile entity, including the command to be run.

Fire Charge
Becomes a fireball, as if produced by a blaze. When a dispensed fireball hits an mob (including a player) or a block, the mob or block will be set on fire. When a dispensed fireball hits a boat or minecart, the vehicle will be destroyed and drop itself as an item.

Flint and Steel
Ignites the block the dispenser is facing; reduces the remaining durability of the used flint and steel

Lava Bucket


Water Bucket
Places lava or water in the block the dispenser is facing (replacing the lava or water bucket in the dispenser with an empty bucket), if the block the dispenser is facing is one that the player could use a lava or water bucket on (e.g., air, flowers, grass, etc.) — otherwise dropped. Water dispensed in The Nether will disappear instantly, leaving only the empty bucket in the dispenser.

Minecart


Minecart with Chest


Minecart with Command Block


Minecart with Furnace


Minecart with Hopper


Minecart with TNT
Placed as entity (i.e., a right-clickable vehicle) in the block the dispenser is facing, if the dispenser is facing a type of rails — otherwise dropped.

Mob head


Pumpkin
Placed as blocks. If placement completes the construction of an iron golem, snow golem, or wither, the entity will be created as if constructed by a player.

Spawn egg
Summons a mob in front of the dispenser.

TNT
Places and ignites TNT in the block the dispenser is facing, with a small velocity in a random direction.
Others Dropped: ejected towards the block the dispenser is facing, as if the player had used the Drop Item control.
When a dispenser dispenses an item, it emits a clicking sound (unless the item is a projectile or a Spawn Egg) and a puff of smoke. If it is empty when activated, it emits a slightly higher-pitched click.
A dispenser is a full solid opaque block, so powering it directly can cause adjacent mechanism components (including other dispensers) to activate as well.

Data values[edit]

Every dispenser has the ID name minecraft:dispenser, and is further defined by its block data and block entity. A dispenser also has a block state which is expected to replace the functionality of block data in a future version.

Block data[edit]

A dispenser uses its block data field to store its orientation and activation status:

Bits Values
0x1
0x2
0x4

Three bits storing a value from 0 to 5:

  • 0: Dispenser facing down
  • 1: Dispenser facing up
  • 2: Dispenser facing north
  • 3: Dispenser facing south
  • 4: Dispenser facing west
  • 5: Dispenser facing east
0x8 If set, the dispenser is activated.

Block entity[edit]

See also: Block entity format

Every dispenser has an associated Trap block entity that holds additional data about the dispenser:


  • Block entity data

    •  id: Trap

    •  x: X coordinate of the Tile Entity.

    •  y: Y coordinate of the Tile Entity.

    •  z: Z coordinate of the Tile Entity.

    •  CustomName: Optional. The name of this dispenser, which will display in its GUI where the default name ordinarily is.

    •  Lock: Optional. When not blank, prevents the dispenser from being accessed unless the opener is holding an item whose name matches this string.

    •  Items: List of items in the dispenser.

      • : An item, including the slot tag. Dispenser slots are numbered 0-8 with 0 in the top left corner.

Block state[edit]

See also: Block states
Name Value Description

 facing
down
east
north
south
west
up
The direction the dispenser is facing.

 triggered
false
true
True if the dispenser is activated.

Video[edit]

Achievements[edit]

Icon Achievement In-game description Prerequisites Actual requirements (if different) Version restriction Xbox points earned Trophy type (PS)
Achievement-plain.png
Grid Dispenser.png
ConsoleOnly.png Dispense With This Construct a Dispenser. Acquire Hardware Xbox & PS 20G Silver

History[edit]

Beta
1.2 Introduced Dispensers.
1.6 Fixed many bugs.
Official release
1.2.1 12w03a They are now able to spawn mobs from a spawn egg.
12w04a The dispenser's texture was changed from Dispenser-Pre 12w04a.png to Dispenser.png.
1.3.1 12w15a Dispensers were given the ability to place Boats and Minecarts.
12w21a Dispensers were given the ability to shoot the liquids inside water and lava buckets. They could also suck up the liquids if activated again, filling up the buckets with the liquid dropped.
12w22a Dispensers can naturally generate within jungle temples and are filled with a random amount of arrows that will shoot the player should they touch the tripwire connected to it or destroy it without shears
1.4.7 1.4.7-pre Fixed crash related to arrows fired from dispensers.
January 18, 2013 Dinnerbone has stated that dispensers will have more features in future, so players should stick to using droppers to dispense items.
1.5 13w04a Dispensers can now face all 6 directions.
Dispensers were given the ability to use many new items. These include TNT, bone meal, flint and steel and equip armor.
13w10b Powered dispensers now do not fire if they receive a redstone update.
1.8 14w04a Dispensers can be used to place the pumpkin to activate Iron Golems, Snow Golems and the Wither Skeleton head to activate the Wither.
14w07a Dispensers now place command blocks and run the preset command if there's one, instead of shooting it out.
Console Edition
TU1 Added dispensers.
TU3 Dispensers use the 1.2 (12w04a) texture Dispenser.png
TU5 Added quick move to the dispenser.
TU9 Dispensers are now able to spawn mobs from a spawn egg.
They were given the ability to shoot out the liquids inside water and lava buckets. They could also suck up the liquids if activated again, but did not fill up the buckets with the liquid dropped due to a bug.
TU10 Fixed the bug where the liquid did not properly fill empty buckets.

Issues[edit]

Issues relating to "Dispenser" are maintained on the issue tracker. Report issues there.

Gallery[edit]