Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 21:10:10 +01:00
Fix losing enchants from stacked items in custom inventories
Dieser Commit ist enthalten in:
Ursprung
42822ddca4
Commit
77ceb0002c
@ -66,7 +66,7 @@ public class CraftInventoryCustom extends CraftInventory {
|
|||||||
this.setItem(i, null);
|
this.setItem(i, null);
|
||||||
result = stack;
|
result = stack;
|
||||||
} else {
|
} else {
|
||||||
result = new ItemStack(stack.id, j, stack.getData());
|
result = new ItemStack(stack.id, j, stack.getData(), stack.getEnchantments());
|
||||||
stack.count -= j;
|
stack.count -= j;
|
||||||
}
|
}
|
||||||
this.update();
|
this.update();
|
||||||
@ -81,7 +81,7 @@ public class CraftInventoryCustom extends CraftInventory {
|
|||||||
this.setItem(i, null);
|
this.setItem(i, null);
|
||||||
result = stack;
|
result = stack;
|
||||||
} else {
|
} else {
|
||||||
result = new ItemStack(stack.id, 1, stack.getData());
|
result = new ItemStack(stack.id, 1, stack.getData(), stack.getEnchantments());
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren