"show me how to determine if a block or entity was hit from a hitresult, and then determine the type of block or entity."