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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user