It saves your inventory to whatever world you are in. If you are in world A, and you have items in your inventory, then you teleport to a new world(world B), your inventory would be empty. If you teleported back to world A, you would have the items you originally have. I believe future world-specific options are planned, such as per world difficulty.