diff options
author | feildmaster <admin@feildmaster.com> | 2012-08-06 08:49:27 -0500 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-08-06 09:09:05 -0500 |
commit | 59aaa6a80a5a6fddb38d79eb9e8130851a64646c (patch) | |
tree | 29d31fd3d51832caaf7d078e68c4b13be59d1042 /src/main/java/net | |
parent | 7dc47892a4f8ac525c06cc0feea8a913d3c2859d (diff) | |
download | craftbukkit-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.java | 5 |
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; |