Should work on OptiFine, though it has only been tested on Iris. Also should work from at least 1.17+ though I think it should work for versions below that
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }