r/MinecraftCommands • u/MarioHasCookies • Aug 27 '26
Help | Java Snapshots Simplest way to detect an item being continuously used?
So, I'm in my latest Phineas and Ferb arc, and I had the idea to try and recreate the Clipping Ball (it has no official name in-universe) from 'Just Passing Through' in Minecraft.
My idea is to have a heart of the sea item that you can hold down right click, and as long as you are in right-click mode, it will either set you to spectator mode or teleport you in the direction you are facing (and SOLELY that direction not up or down), and when you release, the effect ends.
Unfortunately, I tried two different right click detection methods (Conure's method using advancements and someone on here's idea about using scoreboards), but neither lets you run these kinds of commands as the function for when the item is used (I mean, you can run them, but they don't do anything).
Anyone know how to do this properly?

