Fixed low limit for network versions. Fixed exception when mod version is NONE.

This commit is contained in:
2022-01-16 13:58:00 +00:00
parent 62abe17ad4
commit 288a034d63

View File

@ -52,7 +52,7 @@ public class Network {
}
public static String readNetVersion(PacketBuffer buffer) {
String netVersion = buffer.readUtf(16);
String netVersion = buffer.readUtf();
if (!NET_VERSION_PATTERN.matcher(netVersion).matches()) {
return "UNKNOWN (" + netVersion + ")";
}
@ -60,8 +60,8 @@ public class Network {
}
public static String readModVersion(PacketBuffer buffer) {
String modVersion = buffer.readUtf(16);
if (!MOD_VERSION_PATTERN.matcher(modVersion).matches()) {
String modVersion = buffer.readUtf();
if (!modVersion.equals("NONE") && !MOD_VERSION_PATTERN.matcher(modVersion).matches()) {
return "UNKNOWN (" + modVersion + ")";
}
return modVersion;