Please add a brief but descriptive title
What do you need help with?
What do I need exactly to build the latest 1.21.5 myself?
Tried downloading the latest source code and running gradlew build but I get this error. I tried the exact same thing with 1.21.1 and it worked fine. I'd like to build it myself because I want to change how the farming command works so downloading a existing jar is not a possibility. Here the error: baritone-1.14.0\src\api\java\baritone\api\utils\BlockOptionalMeta.java:39: error: package net.minecraft.server.packs.resources does not exist import net.minecraft.server.packs.resources.CloseableResourceManager; ^ baritone-1.14.0\src\api\java\baritone\api\BaritoneAPI.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 100 errors only showing the first 100 errors, of 886 total; use -Xmaxerrs if you would like to see more
Task :compileApiJava FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':compileApiJava'.
Compilation failed; see the compiler error output for details.
- Try:
Run with --info option to get more log output. Run with --scan to get full insights.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 5s 3 actionable tasks: 3 executed
Final checklist
- [] Know how exactly to run build in latest.
In case it helps, here is the gradlew version:
baritone-1.14.0>gradlew --version
Gradle 8.7
Build time: 2024-03-22 15:52:46 UTC Revision: 650af14d7653aa949fce5e886e685efc9cf97c10
Kotlin: 1.9.22 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 17.0.10 (Oracle Corporation 17.0.10+11-LTS-240) OS: Windows 11 10.0 amd64
Tried updating java to 21 but no luck, got the same error message:
baritone-1.14.0>gradlew --version
Gradle 8.7
Build time: 2024-03-22 15:52:46 UTC Revision: 650af14d7653aa949fce5e886e685efc9cf97c10
Kotlin: 1.9.22 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21.0.6 (Oracle Corporation 21.0.6+8-LTS-188) OS: Windows 11 10.0 amd64
Java 21 should be correct. As for why this error occurs: no idea. Seems like Minecraft doesn't (properly) end up on the class path, but no idea what do to with that.
My best bet would be clueless experimentation with various levels of "starting from clean state". Like, have you tried building 1.21.1 again to check whether it still works?