I am currently struggling to compile copied code from a popular Minecraft Mod called SkyblockAddons.
Running on JDK 1.8.0_202, Gradle 2.7 (came with the ExampleMod MDK from Forge) and FML 1.8.9-11.15.1.2318 .
(I think) I setup my workspace correctly.
However, I am unsure about the interdependance of individual versions, so I have tried many different ones, all leading to individual errors.
Using javap -v I could find that the class was compiled using Java 8 (unique Version 52), so I stuck to Java 8.
When trying to compile I get the following errors:
ScoreboardManager.java:51: error: lambda expressions are not supported in -source 1.6
ScoreboardManager.java:60: error: diamond operator is not supported in -source 1.6
and the corresponding code:
List<Score> filteredScores = scores.stream().filter(p_apply_1_ -> p_apply_1_.getPlayerName() != null && !p_apply_1_.getPlayerName().startsWith("#")).collect(Collectors.toList());
scoreboardLines = new ArrayList<>();
It then tells me to: (use -source 7 or higher to enable diamond operator)
I have not specified a certain source version, aside from installing the correct JDK (which would be 1.8).
I have consulted this post, but I would not know how to do that to gradle.
On a desperate attempt I tried running .gradlew -source 7
but that just lead nowhere..
user24667141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2