Talk:Dispenser

This looks inspired by Spelljammer's accelerators. TiriPon 20:37, 13 January 2011 (UTC)

I noticed my Dispensers will only fire through blocks when they are facing West and South. I am assuming Clouds always head North. Hotrian 03:32, 14 January 2011 (UTC)

Fire charges
In multiplayer, would a player be killed by being set on fire by a dispensed Fire Charge, assuming he couldn't pu it out?


 * Trajectory - Shooting fire charges with dispenser doesn't seem to be affected by gravity, like arrows. This makes for a pretty fireworks show. 173.87.247.174 18:46, 26 May 2012 (UTC)

Arrow theory
Anyone else thinking that maybe the arrows fired from the dispenser are skeleton arrows? If so, couldn't they make creepers drop records? --YX33A 22:43, 13 January 2011 (UTC)
 * If there are skeleton arrows, then they should do different amounts of damage on different difficulties. It might be worth testing. I think that on multi-player, you can't pick up someone else's arrows, but I'm not sure, which might be relevant. --Nahere 05:22, 14 January 2011 (UTC)
 * Unfortunately, dispenser-gunning down a creeper does not produce a record. I assume records are 100% chance of drop, as I only tested once before I, during the second trial, regrettably got too close to the creeper and lost the dispenser.  The first creeper dropped nothing. Jaeil 06:02, 14 January 2011 (UTC)

Shooting through blocks
The shooting through blocks only works when the dispenser is facing south. I am building "Trap Temple" and part of it is a corridor where arrows shoot out of the wall. I developed a way to hide the redstone wire so it looks just like a random pressure plate but i'd like arrows coming from both sides not just the north. Please help.

Videos of interest
Videos that aren't quite worthy for the article, but still might be interesting to users --JonTheMon 20:13, 14 January 2011 (UTC)

Here is a video showing the dispenser shooting fully automatic: http://www.youtube.com/watch?v=i0Br_SV3m4M

Block Texture vs Furnace Texture
Actualy, the texture is quite different. the furnace has a filler texture of smooth stone, the 1/3 blocks are centered, and it is somewhat less shiny/blurred.

--Spek 23:40, 14 January 2011 (UTC)

Video 3 Sony Music restrictions
Video 3 is restricted from my country. I see it was a guy from the USA who put up the link. I think it's blocked in whole Europe. Please find a new one so we can view it too. --Iamafinn 10:48, 15 January 2011 (UTC)
 * I think this is why there shouldn't be any youtube videos here. People don't seem to think that putting copyrighted music in it (for no reason other than boredom) could be a bad idea. Germany appears to block every second youtube video. --Flippeh 18:55, 16 January 2011 (UTC)

TNT?
TNT should launch out, as if in a cannon, ready to 'splode, making destruction, fast, easy, and safe! Any Questions?
 * This is a topic for a forum, not here. SteveZombie 18:37, 16 January 2011 (UTC)
 * I agree that thing is the wrong place to put it, but I also think it's a good idea. In there a suggestions page? -- ClapNZ 02:31, 15 March 2011 (UTC)

Oddity
A friend of mine sent me this, I don't have the time currently to verify it, so i thought I would put it here.

"was shooting at a 4x4 wall, and it kept on curving away slightly, and at a different angle depending on the size of the wall" --The Ginger Ninja 02:27, 18 January 2011 (UTC)

I'm sorry but I dont know how to make a new section, is it possible to make dispensers fire downwards in 1.7.3?

Can Dispensers dispense Dispensers?
The title says it all, really. I just want to know if a Dispenser could make Dispensers. Then you could get loads of them! -- ClapNZ 23:33, 14 March 2011 (UTC)
 * Dispensers only provide items already placed in their inventory. SteveZombie 12:51, 20 January 2011 (UTC)
 * I know that. I also know that Dispensers are one of the harder objects to make. Here's an example:


 * You're playing the game on Peaceful. You don't think that you can handle Creepers right now. You go and mine some Redstone, then come up, and have an idea of what to do with it. A whole wall made of Dispensers, shooting arrows, and killing Creepers, Zombies, and Spiders for you. The floor is made of Pressure Pads (stone on a wooden floor) which you can avoid, but creepers can't. But you only have 7 pieces of string. Unfortunately, tha's only enough to make 2.333' arrows. 2.333' arrows is only enough to make 2.333' dispensers, and you are going to need more. You make two dispensers, put one inside the other.


 * What I'm asking is, What happens next? -- ClapNZ 23:33, 14 March 2011 (UTC)


 * PS (literally), sorry about forgetting ~ on the last one. I've added it now, but the time is incorrect.
 * It'll dispense the dispenser like it does any other block obviously... – ultradude25 ( T at 23:55, 14 March 2011 (UTC)
 * It is not obvious. There could easily be restrictions in Minecraft to stop dispensers from dispensing dispensers.


 * There should have been a comma before the word "obviously."
 * Has anyone ever tested it?
 * Why am I using a list?
 * Oh, well. I may as well keep using it.
 * -- ClapNZ 00:08, 15 March 2011 (UTC)
 * Tested, works, is stupid. Darkid 00:47, 15 March 2011 (UTC)
 * dispensers don't make more of what's inside them, they just dispense them.√Onion=Shallot 13:50, 4 August 2011 (UTC)

Specific Science
Two things first:

"Each time the block receives power from a redstone circuit, a random item from its inventory drops out."

and

"If a redstone torch is placed directly above, below, or adjacent to the dispenser, the dispenser will fire twice every time its powered and un-powered by another input."

There is a good reason why this happens. The Dispenser doesn't necessarily fire when it's powered - it fires when it's powered and a redstone signal near it changes. A changing signal near a dispenser will cause it to "recalculate" it's redstone charge, and if it's powered by a constant source of power, it will fire every time the signal changes. What the game does for a toggling charge to a dispenser (dramatized): SignalChange:Powered:Fire!........SignalChange:Unpowered:DontFire.......SignalChange:Powered:Fire! What the game does for a constant charge (every recalculation causes a fire, not just the ones where the signal is on, because of the constant power): SignalChange:Powered:Fire!........SignalChange:Powered:Fire!........SignalChange:Powered:Fire!........

If this is relevant/simple/interesting enough, I can add it to the article.

Do dispensers still fire projectiles?
Recently I have heard some rumors that dispensers do NOT fire arrows, eggs, or snowballs (as of Beta vs. 1.2_02). Please confirm that this is not true. Fwyrl 16:21, 16 February 2011 (UTC)

Works for me in beta 1.3_01. --Jonathan2520 19:18, 27 February 2011 (UTC)

Dispensers, Arrows, and Fire
Do arrows fired from a dispenser through fire set mobs on fire now? I know that arrows from a bow do, and I thought it should be mentioned. 98.232.6.39 22:10, 25 January 2012 (UTC)

-- It seems to do so, however that is slightly random, at least on multiplayer. --CheatCat 10:04, 1 March 2012 (UTC)

Facelift
Dispensers have a new face texture as of 12w04a.

Redstone on Dispensers
I don't know if this is widely known but you can place redstone wire on a dienser in 1.1.0 and power the dispenser, this might be in the bugs section but should it be included under the trivia section of dispensers?


 * If you're using the un-placable bumping glitch to place redstone wire on the dispenser (without triggering it's GUI), then it's not worth mentioning as you can do that with any solid block. – ultradude25 ( T &#124; C ) at 03:18, 7 February 2012 (UTC)

can other people use your dispencer if you privatize it?
? –Preceding unsigned comment was added by Bigal1998 (Talk&#124;Contribs) 04:16, 24 February 2012. Please sign your posts with


 * You can not "privatize" blocks. – ultradude25 ( T &#124; C ) at 04:39, 24 February 2012 (UTC)
 * At least, not without mods, so this question should be directed to the mod author, rather than the wiki. -- Orthotope 07:09, 24 February 2012 (UTC)

Herobrine?
'If a player is killed by arrows fired from a dispenser in SMP, a message will appear saying "[Player name] was shot by Herobrine"' - This seem to be removed in 1.1, when you got shot by an arrow from a dispenser now you got the following message: "[Player] was shot by arrow". Could someone verify that so it isn't just a server mod? --CheatCat 10:01, 1 March 2012 (UTC) This was a message before 1.1 but Mojang removed it. I think they did not want to get thousands of letters saying,"I got shot by an arrow from a dispenser and it said I got shot by Herobrine". --30joe32 21:46, 14 July 2012 (UTC)

Placing
Can they be placed with the special texture face up or down?

Future Dispenser Features?
Now that Power I bows are so much more common, it makes sense that at some point you will be able to make more powerful dispensers if crafted with enchanted bows.

I'm not sure we will ever be able to shoot dispensers straight up (duh!) but shooting down makes good sense.

If confirmed, will add to main page. 173.87.247.174 18:46, 26 May 2012 (UTC)

Drop chances per slot
In the beta time it was that dispencers have a higher chance to put out the last item then it has on the first one. Nowadays it says it doesn't anymore. But when i tested it it would almost never give first 2 slots and alot of the last slot. Maybe some coding to check? –Preceding unsigned comment was added by 94.209.23.98 (Talk&#124;Contribs) 17:49, 5 June 2012‎. Please sign your posts with


 * Looking at the 1.2.5 code, all items have a theoretically equal chance of being dispensed. You're still subject to the whims of the pseudo-random number generator, so it's not uncommon to get unbalanced results in any finite test. Here's the relevant bit of code and some analysis, since it's not obvious that it does the Right Thing:

int i = -1; int j = 1; for (int k = 0; k < dispenserContents.length; k++) {  if (dispenserContents[k] != null && dispenserRandom.nextInt(j++) == 0) {    i = k;   } }
 * k iterates across the dispenser's nine item slots; i is which slot is currently selected to dispense from. Java programmers will note that j only increments after it finds a non-empty slot, so the nth item it finds has a $1/n$ chance of being selected. For item n to be dispensed, the code must select it, and then not select any of the subsequent items (with chances $n/n+1$, $n+1/n+2$, etc., up to $m-1/m$, where m is the number of occupied slots). For a concrete example, suppose there are five items in the dispenser:


 * As you can see, all items have the same chance of being dispensed; it works out similarly for any number of items in the dispenser. A rather clever bit of code, as it doesn't have to keep track of which slots are occupied. -- Orthotope 08:16, 6 June 2012 (UTC)


 * I'll add that true randomness would also be expected to deviate from the expected value, or it wouldn't be random. But other than that Orthotope is entirely correct. The probability for each slot is the same. Dispensers should only do the unexpected about as often as would be expected from randomness, and empirically that's true for me.


 * By the way, if you don't think the code is obvious, try the original broken version that only incremented j in the body of the if statement. That got really hairy, with legally insane probabilities like $1/1$. --Jonathan2520 16:22, 30 June 2012 (UTC)

Possible firing bug with the new tripwire hooks (1.3.2)
In 1.3.2 single player, when a tripwire hook is attached to a block directly adjacent to or below a dispenser, the dispenser fires 2-5 projectiles in a row instead of the expected 1 projectile. Also, moving back and forth along the tripwire (without getting off of it) will continue to trigger 2-5 projectiles for each block change.

If the tripwire hook is attached to dispenser via any amount of redstone or repeaters / etc., the dispenser behaves as expected and fires 1 projectile, no matter how much you move around on the tripwire before getting off.

I added this potential bug here, and not to the tripwire hook page, because it doesn't appear to affect any other object (redstone torch, piston, door, etc.) -- only dispensers. Doesn't seem to matter what items are in the dispenser or what direction the dispenser is facing in, either.

Anyone else noticed this?

VrtraTheory 14:59, 25 August 2012 (UTC)

Max Range
So I decided today to do an experiment to see how far the max range a dispenser could shoot an arrow was, and built a metered firing range (which I then recorded the setup and outcome) and concluded that the max range a dispenser could shoot was 87 metres (80m average plus a dispenser error of 7m). This was done with a dispenser on layer 255 with a metered firing range on layer 1.

However, my client is modded and I do not want this submitted as actual fact in the off-chance that one of my mods affects how far a dispenser shoots. Can I get someone to double-check this?

The recording is at http://www.youtube.com/watch?v=8GnlAD3NOmA and a download link is in the description if anyone wants to check my data, since I don't really like posting links.

EvilJackCarver 22:46, 24 October 2012 (UTC)

Can dispensers dispense arrows without shooting them?
I was wondering if there was a possible way to get dispensers to dispense arrows in thier item pick up form instead of an arrow projectile. This would be very useful for PvP Arenas and whatnot! Stormdrain 15:28, 11 November 2012 (UTC)

If I remember correctly, no. When a dispenser activates with arrows in it, the arrow fires, and does not drop as an item. No workaround as far as I can tell. 208.107.130.244 16:43, 11 November 2012 (UTC)

Dispensers with water in them with a block in front
I just tested putting a bucket of water in a dispenser, and placing a block in front, as so: When a water bucket is put in a dispenser and a block is in front of the dispenser, the game will crash It just dispensed a water bucket. Should I change the original page? —benjabean1 23:36, 23 November 2012 (UTC)