Fix some improper item cloning instances that would have dropped enchantments

This commit is contained in:
Celtic Minstrel
2012-03-13 20:50:36 -04:00
committed by EvilSeph
parent 77ceb0002c
commit f27427ad19
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
}