minerllabs / minerl

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package
http://minerl.io/docs/
Other
709 stars 153 forks source link

Gradle error when building Malmo project with Intellij #653

Closed xieleo5 closed 2 years ago

xieleo5 commented 2 years ago

I had installed minerl in python successfully, and I'm curious about the implementation on the java side. I'd like to know how those control of the game is implemented, so I tried to build Malmo project myself. I used Intellij 2019.3 (version after this do not support gradle 2.14, and I'm also curious about why this repo use such an old version gradle). I set the boot JDK to java-8 and try to import the gradle project. It gives me such error:

This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril.

FAILURE: Build failed with an exception.

* Where:
Build file '/home/xieleo/Desktop/minerl/minerl/Malmo/Minecraft/build.gradle' line: 358

* What went wrong:
A problem occurred evaluating root project 'Minecraft'.
> Could not get unknown property 'canBeResolved' for configuration ':apiCompile' of type org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

CONFIGURE FAILED

Total time: 5.46 secs

I also tried the 'setup_intellij.sh' script in the scripts, and I got:

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Openining IntelliJ - Please select import gradle project on the bottom right
Then import the ../Malmo module:
1) file -> project structure -> modules
2) + -> Module name: Malmo, Module dir: ../Malmo
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

Could anyone give me some hint about how to build the java project locally? I tried on both Windows and Ubuntu 22.04 and get the same result as above.

brandonhoughton commented 2 years ago

Ahh see we should probably delete that file - MCP-Reborn is the directory to use, the malmo structure is only used for the 11.2 version of mc which we have moved on from.

Miffyli commented 2 years ago

Brandon ninja'd me :). Yup the "Malmo" side of code is not in use anymore (although it is remaining there as we have not done proper cleanup). MCP-Reborn is where the stuff is happening, but for obvious reasons, that is not shared here in on github. Try installing MineRL and navigating to the directory where MineRL has been installed; you should find interesting stuff there.

xieleo5 commented 2 years ago

Cool! Thanks for reply!