mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Implement ItemFactory and ItemMeta values. Adds BUKKIT-15
This commit is contained in:
@@ -41,21 +41,6 @@ public final class ItemStack {
|
||||
this.setData(k); // CraftBukkit
|
||||
}
|
||||
|
||||
// CraftBukkit start - used to create a new ItemStack, specifying the enchantments at time of creation.
|
||||
public ItemStack(int id, int count, int data, NBTTagList enchantments) {
|
||||
this(id, count, data);
|
||||
// taken from .addEnchantment
|
||||
if (enchantments != null && Item.byId[this.id].getMaxStackSize() == 1) {
|
||||
if (this.tag == null) {
|
||||
this.setTag(new NBTTagCompound());
|
||||
}
|
||||
|
||||
this.tag.set("ench", enchantments.clone()); // modify this part to use passed in enchantments list
|
||||
// TODO Books, Skulls, Item Names, Item Lore
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public static ItemStack a(NBTTagCompound nbttagcompound) {
|
||||
ItemStack itemstack = new ItemStack();
|
||||
|
||||
|
Reference in New Issue
Block a user