mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-10 17:42:16 +01:00
Stop converting ItemStack to nms ItemStack by hand
This should fix many issues with enchantments being lost, as the method used takes care of enchantments. Additionally, use the new nms ItemStack constructor in places where appropriate. Fixes (at least part of) BUKKIT-7. Need to identify any further places to fix. By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
parent
90baaa255d
commit
8b46844bf4
@ -19,7 +19,7 @@ public class CraftItem extends CraftEntity implements Item {
|
||||
}
|
||||
|
||||
public void setItemStack(ItemStack stack) {
|
||||
item.itemStack = new net.minecraft.server.ItemStack(stack.getTypeId(), stack.getAmount(), stack.getDurability());
|
||||
item.itemStack = CraftItemStack.createNMSItemStack(stack);
|
||||
}
|
||||
|
||||
public int getPickupDelay() {
|
||||
|
Loading…
Reference in New Issue
Block a user