Actually, that describes sheep and goats and their behavior.. It doesn't describe what one must do to be a sheep or a goat
Seems to me that "(34) Then the King will say to those on his right hand, "Come, you whom my Father has blessed, take as your heritage the kingdom prepared for you since the foundation of the world. (35) For I was hungry and you gave me food, I was thirsty and you gave me drink, I was a stranger and you made me welcome, (36) lacking clothes and you clothed me, sick and you visited me, in prison and you came to see me." " is descriptive of what the 'sheep' do and hence what is expected of them while "(41) Then he will say to those on his left hand, "Go away from me, with your curse upon you, to the eternal fire prepared for the devil and his angels. (42) For I was hungry and you never gave me food, I was thirsty and you never gave me anything to drink, (43) I was a stranger and you never made me welcome, lacking clothes and you never clothed me, sick and in prison and you never visited me." " describes what the 'goats' do and hence what lead to their condemnation. Seems that both groups had 'faith' but one had the kind of faith that is unproductive of good works and hence were condemned while the others has productive faith and hence were saved. Saint James explains it thus:
Jas 1:23-25 NJB (23) Anyone who listens to the Word and takes no action is like someone who looks at his own features in a mirror and, (24) once he has seen what he looks like, goes off and immediately forgets it. (25) But anyone who looks steadily at the perfect law of freedom and keeps to it -- not listening and forgetting, but putting it into practice -- will be blessed in every undertaking.
And he adds
Jas 2:13 NJB Whoever acts without mercy will be judged without mercy but mercy can afford to laugh at judgement.
Jas 2:18-24 NJB (18) But someone may say: So you have faith and I have good deeds? Show me this faith of yours without deeds, then! It is by my deeds that I will show you my faith. (19) You believe in the one God -- that is creditable enough, but even the demons have the same belief, and they tremble with fear. (20) Fool! Would you not like to know that faith without deeds is useless? (21) Was not Abraham our father justified by his deed, because he offered his son Isaac on the altar? (22) So you can see that his faith was working together with his deeds; his faith became perfect by what he did. (23) In this way the scripture was fulfilled: Abraham put his faith in God, and this was considered as making him upright; and he received the name 'friend of God'. (24) You see now that it is by deeds, and not only by believing, that someone is justified.
The way one chooses to live, and the way you live is at least in part a choice that one makes for one's self, plays a pivotal role in how God will decide your case either by mercifully saving or by justly condemning. One's faith without works is not sufficient of itself, faith without works is dead.