Minecraft wiki entry for Raw_JSON_text_format, associated text: NBT sources are checked in the order  block,  entity,  storage. If multiple are present, whichever one comes first in that list is used.