summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorh31ix <effectsdude@gmail.com>2012-04-03 19:21:38 -0500
committerfeildmaster <admin@feildmaster.com>2012-04-03 21:42:37 -0500
commit7586e7168b37e46f16592708ab967ca8b6c35f4d (patch)
tree12f4f118e224876d9d6a078b9460fd7996a785b4
parent6a79e506cf3c5b8714d1e684713758ca6037540b (diff)
downloadcraftbukkit-7586e7168b37e46f16592708ab967ca8b6c35f4d.tar
craftbukkit-7586e7168b37e46f16592708ab967ca8b6c35f4d.tar.gz
craftbukkit-7586e7168b37e46f16592708ab967ca8b6c35f4d.tar.lz
craftbukkit-7586e7168b37e46f16592708ab967ca8b6c35f4d.tar.xz
craftbukkit-7586e7168b37e46f16592708ab967ca8b6c35f4d.zip
Make the dispenser check if the dispensed item has been changed before removing it. Fixes BUKKIT-316
-rw-r--r--src/main/java/net/minecraft/server/BlockDispenser.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
index 34665555..1debc7da 100644
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -132,8 +132,10 @@ public class BlockDispenser extends BlockContainer {
return;
}
- // Actually remove the item
- tileentitydispenser.splitStack(dispenseSlot, 1);
+ if (event.getItem().equals(bukkitItem)) {
+ // Actually remove the item
+ tileentitydispenser.splitStack(dispenseSlot, 1);
+ }
motX = event.getVelocity().getX();
motY = event.getVelocity().getY();