The BlockHit class contains the results of a call to the entity’s scanView() function.
The BlockHit class is a subtype of the Object class and inherits all its properties and functions.
Here is an overview of the BlockHit properties:
Property | Type | read / write |
---|---|---|
hitVec | Vec3 | r |
pos | Vec3 | r |
sideHit | string | r |
Below you find short descriptions about each of the properties and some examples about how to use them in your spells.
This is the exact position where the scan hit the block.
This is the position of the block that was hit by the scan.
This is the name of the block’s side where the scan hit the block. This can be one of ‘down’, ‘up’, ‘south’, ‘west’, ‘north’, and ‘east’.