Better way to encode traits using NBTTagCompounds