getNamespacedKeyByEntity

fun getNamespacedKeyByEntity(entity: Entity?): String?

Reads the custom-entity key stored on entity, or null for vanilla/absent entities.