Thread:S'moregoth/@comment-32559432-20170719165344/@comment-27219153-20170720021709

Using NPCPersistent:1 should accomplish that. See NBT-data for more info.