In theory, the server gives only how many pixels should be in the bar, based on internal calculations.
I am presuming 'show the percentage' is what was meant and what the answer is pertained to, so the game calculating how much % the monster has of HP left and showing that is one or two more steps done every cycle and attack.

Of course, all that a UI mod could do is make a wild guess of how many pixels means 1%