Implement ItemFactory and ItemMeta values. Adds BUKKIT-15

This commit is contained in:
Wesley Wolfe
2012-12-17 01:31:41 -06:00
parent d20d4dc43a
commit 78f48258d8
70 changed files with 3773 additions and 313 deletions

View File

@@ -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();