Well, if the magic jar item refils gradually you could just spawn a magic jar on top of Link when he drinks a potion. I can't remember though.