Aether tile entities save custom names

This commit is contained in:
Kino 2017-12-24 00:10:04 -05:00
parent 38bead1cd9
commit 49d6d153c0

View file

@ -116,6 +116,11 @@ public abstract class AetherTileEntity extends TileEntity implements ISidedInven
this.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(nbttagcompound1));
}
}
if (nbttagcompound.hasKey("CustomName", 8))
{
this.customTileName = nbttagcompound.getString("CustomName");
}
}
@Override
@ -135,6 +140,12 @@ public abstract class AetherTileEntity extends TileEntity implements ISidedInven
}
nbttagcompound.setTag("Items", nbttaglist);
if (this.hasCustomName())
{
nbttagcompound.setString("CustomName", this.customTileName);
}
return super.writeToNBT(nbttagcompound);
}