Mojang created a brand new system (and library) for commands:
https://github.com/Mojang/brigadier
I don't know if there's a Forge wrapper for this library, but regardless the entire command system has changed.
Get over your fear of sending packets. The server is never aware of a "left-click empty" event - that's even mentioned in the javadoc for the PlayerInteractEvent.LeftClickEmpty event. Your only option if you want to inform the server is to listen for that event on the client and send a packet.
That's quite literally what readPixels is supposed to do - it reads the pixel values from the currently bound framebuffer. For the future you can read documentation about opengl methods here.
For actually reading the pixel values from a texture you need to use getTexImage. Note that it will dump the entire texture onto the buffer though.
You could render the part of the texture you need onto a framebuffer and read from that using readPixels but I don't think it is going to be faster than reading the entire texture.