I was fighting the ender dragon and needed one hit left, but i ran out of arrows. The dragon got stuck in a loop, flying in a circle around a pillar. Waited for a descent amount of time, yet it stayed up. I built up to the dragon and couldn't attack him with my sword. I relogged and the dragon gained all health back and got stuck flying in a circle over and over again.
Duplicates MC-148179