Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also recognize the Java 16 warning #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libs/background-cat/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ fn one_seventeen_plus_java_too_old(log: &str) -> Option<(&str, String)> {
const UNSUPPORTED_CLASS_VERSION_ERROR: &str = "java.lang.UnsupportedClassVersionError: net/minecraft/client/main/Main";
const FABRIC_JAVA_VERSION_ERROR: &str = "fabric requires {java @ [>=16]}";
const FABRIC_JAVA_VERSION_ERROR_SEVENTEEN: &str = "fabric requires {java @ [>=17]}";
const JAVA_16_WARNING: &str = "Minecraft 21w19a and above require the use of Java 16";
const JAVA_17_WARNING: &str = "Minecraft 1.18 Pre Release 2 and above require the use of Java 17";

if log.contains(UNSUPPORTED_CLASS_VERSION_ERROR)
|| log.contains(FABRIC_JAVA_VERSION_ERROR)
|| log.contains(FABRIC_JAVA_VERSION_ERROR_SEVENTEEN)
|| log.contains(JAVA_16_WARNING)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but the response is then about java 17, which is not right...

|| log.contains(JAVA_17_WARNING)
{
Some(("‼", RESPONSES.get("use-java-17")?.to_string()))
Expand Down