Fix losing enchants from stacked items in custom inventories

This commit is contained in:
Wesley Wolfe authored and EvilSeph committed 2012-03-15 21:47:29 -04:00
1 parent 42822ddca4
commit 77ceb0002c
1 file changed
+2 -2
@@ -66,7 +66,7 @@ public class CraftInventoryCustom extends CraftInventory {
this.setItem(i, null);
result = stack;
} else {
result = new ItemStack(stack.id, j, stack.getData());
result = new ItemStack(stack.id, j, stack.getData(), stack.getEnchantments());
stack.count -= j;
}
this.update();
@@ -81,7 +81,7 @@ public class CraftInventoryCustom extends CraftInventory {
this.setItem(i, null);
result = stack;
} else {
result = new ItemStack(stack.id, 1, stack.getData());
result = new ItemStack(stack.id, 1, stack.getData(), stack.getEnchantments());
stack.count -= 1;
}
return result;