Okay, given what you said and what I found in the source code, this is what I know:
There is a class called BlocksFromXml with a method that takes the blocks.xml and for each block in the xml creates a new block object in the game. There is also a ItemsFromXml class that does the same for the items.
Now, I don't really care for blocks as blocks, but as items you get from them.
There is a small method again that will copy certain block parameters and create item from them.
I think this is the workflow:
First, it loads/generates blocks from blocks.xml, I assume with IDs as you described. Then, it generates items from all of the blocks. Those items most likely have the same ID that the blocks they represent do.
Once that is done, it loads/generates items from items.xml, but I'm assuming the IDs here start with 32769, so they don't overlap with the items generated from the blocks. The block limit in the source code is 32768, as you said (IDs go from 0 to 32767), while the item limit is 2*block limit or 65536 (which I also found in the source code). I'm assuming they are read sequentially, but that's based solely on your word, since I cannot find that bit in the code.
That leaves me with a few things I'd like to clear up with someone more familiar with the code, if there are such people here.
Both methods that load the xmls into ItemClass and Block objects should not work at all. They return void, and the ItemClass/Block that they generated is never stored (referenced) by anything else in the method, meaning that it would be collected by garbage collector and deleted. Essentially, from what I can tell, while the methods parses xml the way it should, the result is not stored anywhere.
The second thing that's bothering me is that nowhere in the code I can't find where an item/block is explicitly given an id. There are a bunch of dictionaries that map item/block names to ids and vice versa and whatnot, but for none of them I couldn't figure out how they were created, or how IDs were mapped to item name or object. I would find that one dictionary is created by looking things up from another dictionary, while that other dictionary is created with the data from the first, which leaves me very confused.
If anyone would be kind enough to explain to me how any of this works, I would be really grateful.