public static Inventory stringToInventory(final String data)  throws Exception {
		Inventory inventory = null;

		try {
			final ByteArrayInputStream dataInput = new ByteArrayInputStream(
					new BigInteger(data, 32).toByteArray());
			final InputStream inputStream = new DataInputStream(dataInput);

			// More MC internals :(
			final NBTTagCompound tagCompound = NBTCompressedStreamTools
					.a(inputStream);

			NBTTagList itemList = tagCompound.getList("Items", 10);

			//-----------------------------------------------------------------
			// create inventory
			//-----------------------------------------------------------------
			// TODO: fix this monkey patch!
			// get max slot number = max of inventory
			int maxSlot = 0;
			for (int i = 0; i < itemList.size(); i++) {
				int tmp = itemList.get(i).getByte("Slot") & 0xFF;
				if(maxSlot < tmp){
					maxSlot = tmp;
				}
			}
			inventory = createInventory(null, maxSlot+1);

			for (int i = 0; i < itemList.size(); i++) {
				NBTTagCompound tmpTagCompound = itemList.get(i);
				int slot = tmpTagCompound.getByte("Slot") & 0xFF;
				//System.out.println("slot="+slot+" ,inventory.getsize="+inventory.getSize());

				if(slot >= 0 && slot < inventory.getSize()){
					net.minecraft.server.v1_7_R3.ItemStack itemStack = net.minecraft.server.v1_7_R3.ItemStack
							.createStack(tmpTagCompound);

					CraftItemStack craftItemStack = CraftItemStack.asCraftMirror(itemStack);
					inventory.setItem(slot, craftItemStack);
				}
			}
			//-----------------------------------------------------------------

		} catch (Exception e) {
			e.printStackTrace();
			throw new Exception(
					"Sorry, your inventory isn't compatible with this version. Clear and create new one.");
		}

		return inventory;
	}