I would have thought that to save on calculations, it would be better to remove entity from the arguments.  All this method really has to do it take the 3 sub-blocks from the back of the entity moving and put them in front of it.

This would mean that it wouldn't be necessary to call the getPosition method, just to shift what is in the 3 sub-blocks on the back side. 

The third argument was originally to act as a sanity check to make sure that there weren't any entities moving other entities and therefore like teleporting themselves into other things, etc.  This is rendered unnecessary by correct coding obviously.