As of now, the best ways to detect mouse clicks are either with carrots on a stick/ warped fungus on a stick, hitting mobs, or talking to untradable villagers always teleporting in front of the player.
Don't even let me get started on detecting the pressed keys which not only require the player to be riding another entity but also vector calculations.
In other words, what is possible at the moment always has some limitations, complications or is very command intensive.
Also the frequency at which carrot on a stick clicks are detected is every 4 ticks, so it's impossible to have a system that detects when a mouse button is being constantly pressed.
What could be done is either add scoreboard objectives that increase in value when the keys are pressed or make it a game event that can be detected via /execute
Thanks for your time :)
Please sign in to leave a comment.
2 Comments