Minecraft wiki entry for NBT_format, associated text: When commands such as /clear, /execute if data are used to match data tags, or nbt argument in target selector tries to target entity, the game converts SNBT into programmatic NBT object and gets programmatic NBT object from block/entity/storage, then compares the two NBT objects.