summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-08-06 08:49:27 -0500
committerfeildmaster <admin@feildmaster.com>2012-08-06 09:09:05 -0500
commit59aaa6a80a5a6fddb38d79eb9e8130851a64646c (patch)
tree29d31fd3d51832caaf7d078e68c4b13be59d1042 /src/main/java/net
parent7dc47892a4f8ac525c06cc0feea8a913d3c2859d (diff)
downloadcraftbukkit-59aaa6a80a5a6fddb38d79eb9e8130851a64646c.tar
craftbukkit-59aaa6a80a5a6fddb38d79eb9e8130851a64646c.tar.gz
craftbukkit-59aaa6a80a5a6fddb38d79eb9e8130851a64646c.tar.lz
craftbukkit-59aaa6a80a5a6fddb38d79eb9e8130851a64646c.tar.xz
craftbukkit-59aaa6a80a5a6fddb38d79eb9e8130851a64646c.zip
Fix dispenser removing data from items. Fixes BUKKIT-2045
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/BlockDispenser.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
index 1114f694..bb1928a2 100644
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -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;