Forestry

Forestry

65M Downloads

erroneous nbt format of letter

IslenautsGK opened this issue ยท 0 comments

commented

nbt in forestry.core.inventory.ItemInventory.setUID and forestry.core.inventory.ItemInventory.isSameItemInventory is Integer, bug in forestry.mail.Letter. is String

private void setUID(NBTTagCompound nbt) {
if (!nbt.hasKey(KEY_UID)) {
nbt.setInteger(KEY_UID, rand.nextInt());
}
}

public Letter(NBTTagCompound nbttagcompound) {
this.isProcessed = nbttagcompound.getBoolean("PRC");
this.sender = new MailAddress(nbttagcompound.getCompoundTag("SDR"));
this.recipient = new MailAddress(nbttagcompound.getCompoundTag("RC"));

this.text = nbttagcompound.getString("TXT");
this.uid = nbttagcompound.**getString**("UID");
this.inventory.readFromNBT(nbttagcompound);

}