From 7586e7168b37e46f16592708ab967ca8b6c35f4d Mon Sep 17 00:00:00 2001 From: h31ix Date: Tue, 3 Apr 2012 19:21:38 -0500 Subject: Make the dispenser check if the dispensed item has been changed before removing it. Fixes BUKKIT-316 --- src/main/java/net/minecraft/server/BlockDispenser.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/net/minecraft/server/BlockDispenser.java') 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(); -- cgit v1.2.3