You can make item that summons an entity(invisible and immunity for projectiles) in fron of player when right clicked. It should teleport in front of player(for example: execute as @p run tp @e[type=modname:entityname,limit=1,sort=nearest] ^ ^ ^0.5), but it have to be summoned and disappear when player stop right clicking.
https://mcreator.net/tracker/issue/49684
You can make item that summons an entity(invisible and immunity for projectiles) in fron of player when right clicked. It should teleport in front of player(for example: execute as @p run tp @e[type=modname:entityname,limit=1,sort=nearest] ^ ^ ^0.5), but it have to be summoned and disappear when player stop right clicking.
(sorry for my English, is not my native language)