Example #1
0
  public ItemStack cloneItemStack() {
    ItemStack itemstack = new ItemStack(this.id, this.count, this.damage);

    if (this.tag != null) {
      itemstack.tag = (NBTTagCompound) this.tag.clone();
    }

    return itemstack;
  }
Example #2
0
  public ItemStack a(int i) {
    ItemStack itemstack = new ItemStack(this.id, i, this.damage);

    if (this.tag != null) {
      itemstack.tag = (NBTTagCompound) this.tag.clone();
    }

    this.count -= i;
    return itemstack;
  }