Not necessary when you only need the inventory in the container. Only sync to the client what is necessary, not the whole TE data.
Use TileEntity#getBlockState instead.
It's fine to use IInventory if you really want to. But you do need to implement getCapability and provide the IItemHandler capability if you want automation to work with your inventory.
The problem is most likely that you must do the setItem stuff on the server only.