What do you mean by creating a "custom Inventory" ? Is the InventoryBasic not sufficient for this kind of things ?
Also, I am surprised that nobody tried to develop this in Forge. I searched few minutes on google and different forge forums and I have not been able to find a single topic talking about this.
Create a class that extends InventoryBasic. Then in the constructor have it pass ItemStack Arrays and loop through them and add them to the already existing array with setInventorySlotContents or addItem.
In your event you are not creating a new instance of your EntityVillager, but a vanilla one. And then you add it to the world which fires the on EntityJoinedWorldEvent, this hangs the server thread and nothing gets updated.
What do you think this does,
this.entityInventory = new InventoryBasic("NPC Inventory", true,
Iterables.size(this.inventoryArmor) + Iterables.size(this.heldEquipment));
First the new version is easy. GameRegistry.register(block/item/enchantment/etc) as long as they have their registry name set.
And I did not mean the class where you register and initialize blocks, but your class that has the @Mod annotation.
Put a println in your renderTileEntityAt method, if something prints then the TESR is there; and it would help a lot if you limit it down to a specific area that it fails at, if it doesn't then we have a problem.
If you are saving an inventory to a TE, you should just be able to do itemStackHandlerField.serialize/deserialize. Have you switched over to the new Capability system?