The only way to get Herobrine is via a plugin yes, you don't even need those code elements, just create a new entity handler to handle the AI and use a hashlist to keep track of it, no problem, there are even tonnes about.
What I'm saying is, Herobrine -the ledgend- does not exist, its fake, its a joke by the developers (what we would like to add but cant). People have caught onto this, developed the myth, and then people made the plugins to simulate/implement Herobrine.
infact last MineCon, Notch said it best when asked if HB was returning:
"Herobrine isn't real, thats a dumb question" (and the look on the kids face was priceless, thanks MasterCard)
To be honest, I don't know any of the following things:
Why this thread exists
Why I'm posting
Why I checked for a reply
Pi down to 36 decimal places.