This is a long time to answer, but i did start modding a little time ago and i did found this thread looking for this, so now that i got the answer better share where it will be found =)
I got 2 things for comment:
First:The rotation is given from -180 to +180, with 0 when facing sout (you can check the rotation in F3)
So you should get the code in that way
Second:To get the rotation I use better:
rotate = entityliving.rotationYaw;
Im not sure on what is know as "thePlayer" in modloader, but that line works just fine
In conclusion, i got the line from the repeater block:
I figured this out a long time ago lol Thanks anyway