Ejemplo n.º 1
0
  public void writeToNBT(NBTTagCompound compound) {
    super.writeToNBT(compound);
    NBTTagList nbttaglist = new NBTTagList();

    for (int i = 0; i < this.chestContents.length; ++i) {
      if (this.chestContents[i] != null) {
        NBTTagCompound nbttagcompound = new NBTTagCompound();
        nbttagcompound.setByte("Slot", (byte) i);
        this.chestContents[i].writeToNBT(nbttagcompound);
        nbttaglist.appendTag(nbttagcompound);
      }
    }

    compound.setTag("Items", nbttaglist);

    if (this.hasCustomName()) {
      compound.setString("CustomName", this.customName);
    }
  }
Ejemplo n.º 2
0
  public void writeToNBT(NBTTagCompound compound) {
    super.writeToNBT(compound);
    compound.setShort("BurnTime", (short) this.furnaceBurnTime);
    compound.setShort("CookTime", (short) this.field_174906_k);
    compound.setShort("CookTimeTotal", (short) this.field_174905_l);
    NBTTagList var2 = new NBTTagList();

    for (int var3 = 0; var3 < this.furnaceItemStacks.length; ++var3) {
      if (this.furnaceItemStacks[var3] != null) {
        NBTTagCompound var4 = new NBTTagCompound();
        var4.setByte("Slot", (byte) var3);
        this.furnaceItemStacks[var3].writeToNBT(var4);
        var2.appendTag(var4);
      }
    }

    compound.setTag("Items", var2);

    if (this.hasCustomName()) {
      compound.setString("CustomName", this.furnaceCustomName);
    }
  }