async function goToNearestEntity(bot, entityType, min_distance=2, range=64) {
    /**
     * Navigate to the nearest entity of the given type.
     * @param {MinecraftBot} bot, reference to the minecraft bot.
     * @param {string} entityType, the type of entity to navigate to.
     * @param {number} min_distance, the distance to keep from the entity. Defaults to 2.
     * @param {number} range, the range to look for the entity. Defaults to 64.
     * @returns {Promise<boolean>} true if the entity was reached, false otherwise.
     **/
    let entity = world.getNearestEntityWhere(bot, entity => entity.name === entityType, range);
    if (!entity) {
        log(bot, `Could not find any ${entityType} in ${range} blocks.`);
        return false;
    }
    let distance = bot.entity.position.distanceTo(entity.position);
    log(bot, `Found ${entityType} ${distance} blocks away.`);
    await goToPosition(bot, entity.position.x, entity.position.y, entity.position.z, min_distance);
    return true;
}
Navigate to the nearest block of the given type.
@param {MinecraftBot} bot, reference to the minecraft bot.
@param {string} blockType, the type of block to navigate to.
@param {number} min_distance, the distance to keep from the block. Defaults to 2.
@param {number} range, the range to look for the block. Defaults to 64.
@returns {Promise<boolean>} true if the block was reached, false otherwise.
@example
await skills.goToNearestBlock(bot, "oak_log", 64, 2);
*