*
* @param tags Tag list
* @return Inventory
*/
public static Inventory createInventory(CommonTagList tags) {
Inventory inv = new CraftInventoryCustom(null, tags.size());
for(int i = 0; i < tags.size(); i++) {
CommonTagCompound tag = (CommonTagCompound) tags.get(i);
if(!tag.isEmpty()) {
inv.setItem(i, CraftItemStack.asCraftMirror(ItemStack.createStack(
(NBTTagCompound) tag.getHandle())));
}
}
return inv;