No, you can only play multiplayer if you have the same version of Minecraft and the same version of mods.
It is however fairly simple to install something like Feed the Beast and have multiple copies of Minecraft installed at the same time, this way your friend can have mods to play multiplayer and when he's playing alone he can play vanilla Minecraft without having problems with his save files.
As @dlras2 mentioned, it can work if you only have mods that are client side, like mini maps. Basically anything that changes crafting or adds new blocks/items will not work without having the other player also having that mod (because all that is sent is "Hey, make this item" and the unmodded client will then go "I HAVE NO IDEA WHAT TO DO AND I AM PANICKING" and then probably crash)
Since you mention issues with other players being too close, you probably know about target selectors and have been using @p or @a[r=...] to select the nearest player or all within a really small range. The problem looks to be arising from either multiple players being within the range, or @p targeting different players in different command blocks.
So how do we fix that? One approach would be to use a scoreboard objective to keep track of a single person purchasing. First, set up a state objective by entering
/scoreboard objectives add purchasing dummy
This adds an objective called "purchasing" which we will use to ensure only one player is affected. The idea is that you set it up so that pressing the button to buy an item gives exactly one of the players a score of 1 in this objective, do all your other commands (such as verifying sufficient currency, xp, etc.) with @a[score_purchasing=1] and then reset it back to zero when you've done all of that. For example, this setup:
With commands of
1) /scoreboard players add @p purchasing 1
2) /testfor @a[score_purchasing=1,lm=15]
3) /give @a[score_purchasing=1] diamond
4) /xp -15L @a[score_purchasing=1]
5) /scoreboard players reset @a purchasing
Will (in approximately* this order) designate the closest player as the one who is purchasing an item, check if they have at least 15 levels, and subtract 15 levels and give them a diamond if so. After that, the purchasing score of everyone is set back to zero. Note that the torch and repeater is needed in this case to (respectively) reset the /testfor command and ensure the scoreboard objective reset occurs last.
*Strictly speaking, the order of execution of the pairs of 1,2 and 3,4 is non-deterministic, but they will still execute within the same tick (1/20 sec). This often isn't an issue, but can be changed by using fill clocks (\fill commands with redstone blocks) if needed.
Best Answer
I've developed a data pack that allows Riptide, Channeling, and Loyalty to be combined together. Anvils will work to combine Riptide but only when you are not in rain and Riptide is applied first; enchantment tables won't apply them together though.
The data pack is downloadable here.
Concepts used
CanPlaceOn
/CanDestroy
data on items through the item's lore, and modified it to display fake enchantments instead. When a user is not in the rain, the Riptide enchantment is removed from the enchantments list and a fake Riptide enchantment is added via the lore.If you experience any problems with this data pack, please create an issue on GitHub instead of commenting below!