Fix some improper item cloning instances that would have dropped enchantments

By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
CraftBukkit/Spigot
2012-03-13 20:50:36 -04:00
parent a247a422c1
commit 5a2b483937
3 changed files with 4 additions and 4 deletions

View File

@@ -68,8 +68,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
public void setItemOnCursor(ItemStack item) {
CraftItemStack stack = new CraftItemStack(item.getType(), item.getAmount(), item.getDurability());
getHandle().inventory.setCarried(stack.getType() == Material.AIR ? null : stack.getHandle());
CraftItemStack stack = new CraftItemStack(item);
getHandle().inventory.setCarried(stack.getHandle());
if (this instanceof CraftPlayer) {
((EntityPlayer) getHandle()).broadcastCarriedItem(); // Send set slot for cursor
}