I was developing my mod for Minecraft 1.21 , and tested it through runClient, and everything worked. But when I used ./gradlew build, and moved the mod to the /mods folder, and tried to run the game, I got an error:
java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors provided by 'mymod'.
I thought my code contained errors, so I tried downloading the source code of the random mod for 1.21.
https://github.com/Theoness1/EatingAnimation
I used ./gradlew build again, and moved the mod to the /mods folder, and got a similar error.
https://mclo.gs/lImkLM3
I tried:
- Reinstall java: https://adoptium.net/temurin/releases/?package=jdk&arch=x64&version=21&os=windows
- Reinstall IntelliJ IDEA
- Use
./gradlew genSources,./gradlew downloadAssets,./gradlew buildDependents. - Deleted the
.gradlefolder from the home directory to make it load again. - In Project Settings I chose to use
SDK: 21 java version "21.0.3".