* @return Deserialized inventory
*/
public static Inventory fromString(String data) {
ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data));
NBTTagList itemList = (NBTTagList) readNbt(new DataInputStream(inputStream), 0);
Inventory inventory = new CraftInventoryCustom(null, itemList.size());
for (int i = 0; i < itemList.size(); i++) {
NBTTagCompound inputObject = itemList.get(i);
if (!inputObject.isEmpty()) {
inventory.setItem(i, CraftItemStack.asCraftMirror(
net.minecraft.server.v1_7_R1.ItemStack.createStack(inputObject)));
}
}
// Serialize that array