Fix dispenser removing data from items. Fixes BUKKIT-2045

This commit is contained in:
feildmaster 2012-08-06 08:49:27 -05:00
parent 7dc47892a4
commit 59aaa6a80a

View file

@ -106,8 +106,9 @@ public class BlockDispenser extends BlockContainer {
ItemStack itemstack = tileentitydispenser.getItem(i1);
// CraftBukkit start
// Copy item stack, because we want it to have 1 item
itemstack = new ItemStack(itemstack.id, 1, itemstack.getData(), itemstack.getEnchantments());
// Clone item stack, then set the count to 1
itemstack = itemstack.cloneItemStack();
itemstack.count = 1;
double d3 = random.nextDouble() * 0.1D + 0.2D;
double motX = (double) b0 * d3;