mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 09:16:06 +01:00
Fix losing enchants from stacked items in custom inventories
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
852f37abfd
commit
a247a422c1
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue