You can have a look at this:
https://bitbucket.org/pelluciddice/ava/src/25660921a9340d7f3d99f2dc790d4852898c8156/src/main/java/pellucid/ava/entities/BouncingEntity.java#lines-40:65
where in this case a grenade.
If RayTraceResult#getType returns BLOCK, then you know the ray trace is an instance of BlockRayTraceResult which has a method called #getDirection (or #getFace in MCP) exactly for that.