Java port of original Entity Position Interpolation Code