fixed bugs in MovingEntitiesOperator, improved getDistanceToBottomOfEntity, isRestingOnSurface