# HitResults

Lets scripts distinguish block and entity targeting results through the `HitResults` global.  
 `Block` includes misses; use `isMissed()` to distinguish them.  
 ```js
const interactions = Player.interactions();  
const hit = interactions === null ? null : interactions.getTarget();  
if (hit instanceof HitResults.Entity) {
  Chat.log(hit.getEntity().getName());  
}
 ```

These names are available in JavaScript and Python without importing anything. They are read-only aliases of Java types, so `instanceof` works as usual.

| Script name | What it is |
| --- | --- |
| [`HitResults.Block`](/2.1.0/1.21.8/classes/com/jsmacrosce/jsmacros/client/api/helper/world/HitResultHelper.Block.md) | Represents a block hit or miss; use isMissed() to distinguish them. |
| [`HitResults.Entity`](/2.1.0/1.21.8/classes/com/jsmacrosce/jsmacros/client/api/helper/world/HitResultHelper.Entity.md) | A target that carries the entity and the hit location recorded by the hit result. |
| [`HitResults.Result`](/2.1.0/1.21.8/classes/com/jsmacrosce/jsmacros/client/api/helper/world/HitResultHelper.md) | Wraps a crosshair hit result, with shared access to its hit position and subtype-specific access for block and entity hits. |

