Close To Tagged Block

=Notes= Close To Tagged Block and Beyond Tagged Block are General Actions that check the distance to the nearest tagged block, and compares it with the parameter. They can only be conditions. (i.e. they can only be placed on the left side of "Does" in the Action Panel.)

Each different tag has a corresponding pair of these actions.

When the action is selected, a white sphere centred on the centre of the block is visible. Its radius is the parameter.

Close To Tagged Block
This action calculates the distance between two points:
 * the centre of the block (containing the script)
 * the nearest point on the nearest tagged block's axis-aligned bounding box

This distance is compared with the parameter. If it is less than the parameter, the condition is True.

Beyond Tagged Block
This condition is nearly the opposite of Close To. It is True if the nearest tagged block is not within the specified distance from the centre of the block with the script.

Warning
If the tag corresponding to the Close To or Beyond actions doesn't exist in the world, the the condition is always False.

Axis-aligned bounding box (AABB)
The AABB of a block is a box that encloses the entire hitbox of the block. The sides of this box are aligned with the XYZ axes of the world.

These actions use AABBs instead of the actual hitboxes because it simplifies the calculations (and therefore reduces lag).

Further reading: Minimum bounding box - Wikipedia