diff --git a/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/McVersionLookup.java b/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/McVersionLookup.java index 556c1901b..7d6a331fc 100644 --- a/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/McVersionLookup.java +++ b/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/McVersionLookup.java @@ -49,7 +49,7 @@ public final class McVersionLookup { private static final Pattern VERSION_PATTERN = Pattern.compile( "0\\.\\d+(\\.\\d+)?a?(_\\d+)?|" // match classic versions first: 0.1.2a_34 - + "\\d+\\.\\d+(\\.\\d+)?(-pre\\d+| Pre-?[Rr]elease \\d+)?|" // modern non-snapshot: 1.2, 1.2.3, optional -preN or " Pre-Release N" suffix + + "\\d+\\.\\d+(\\.\\d+)?(-pre\\d+| Pre-?[Rr]elease \\d.?+)?|" // modern non-snapshot: 1.2, 1.2.3, optional -preN or " Pre-Release N" suffix + "\\d+\\.\\d+(\\.\\d+)?(-rc\\d+| [Rr]elease Candidate \\d+)?|" // 1.16+ Release Candidate + "\\d+w\\d+[a-z]|" // modern snapshot: 12w34a + "[a-c]\\d\\.\\d+(\\.\\d+)?[a-z]?(_\\d+)?[a-z]?|" // alpha/beta a1.2.3_45 @@ -60,7 +60,7 @@ public final class McVersionLookup { + "(.*[Ee]xperimental [Ss]napshot )(\\d+)" // Experimental versions. ); private static final Pattern RELEASE_PATTERN = Pattern.compile("\\d+\\.\\d+(\\.\\d+)?"); - private static final Pattern PRE_RELEASE_PATTERN = Pattern.compile(".+(?:-pre| Pre-?[Rr]elease )(\\d+)"); + private static final Pattern PRE_RELEASE_PATTERN = Pattern.compile(".+(?:-pre| Pre-?[Rr]elease )(\\d.?+)"); private static final Pattern RELEASE_CANDIDATE_PATTERN = Pattern.compile(".+(?:-rc| [Rr]elease Candidate )(\\d+)"); private static final Pattern SNAPSHOT_PATTERN = Pattern.compile("(?:Snapshot )?(\\d+)w0?(0|[1-9]\\d*)([a-z])"); private static final Pattern EXPERIMENTAL_PATTERN = Pattern.compile("(?:.*[Ee]xperimental [Ss]napshot )(\\d+)"); diff --git a/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/patch/EntrypointPatch.java b/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/patch/EntrypointPatch.java index 445d693a4..6f3ae63de 100644 --- a/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/patch/EntrypointPatch.java +++ b/minecraft/src/main/java/net/fabricmc/loader/impl/game/minecraft/patch/EntrypointPatch.java @@ -578,7 +578,7 @@ private boolean hasStrInMethod(String cls, String methodName, String methodDesc, private Version getGameVersion() { try { - return VersionParser.parseSemantic(gameProvider.getNormalizedGameVersion()); + return VersionParser.parse(gameProvider.getNormalizedGameVersion(),false); } catch (VersionParsingException e) { throw new RuntimeException(e); } diff --git a/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java b/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java index cc2f5671a..d68c68c32 100644 --- a/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java +++ b/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java @@ -71,7 +71,7 @@ public final class FabricLoaderImpl extends net.fabricmc.loader.FabricLoader { public static final int ASM_VERSION = Opcodes.ASM9; - public static final String VERSION = "0.14.19-babric.1"; + public static final String VERSION = "0.14.19-babric.3-bta"; public static final String MOD_ID = "fabricloader"; public static final String CACHE_DIR_NAME = ".fabric"; // relative to game dir diff --git a/src/main/java/net/fabricmc/loader/impl/metadata/BuiltinModMetadata.java b/src/main/java/net/fabricmc/loader/impl/metadata/BuiltinModMetadata.java index b1e2e2c3d..b64573980 100644 --- a/src/main/java/net/fabricmc/loader/impl/metadata/BuiltinModMetadata.java +++ b/src/main/java/net/fabricmc/loader/impl/metadata/BuiltinModMetadata.java @@ -172,7 +172,7 @@ public Builder(String id, String version) { this.name = this.id = id; try { - this.version = VersionParser.parseSemantic(version); + this.version = VersionParser.parse(version,false); } catch (VersionParsingException e) { throw new RuntimeException(e); } diff --git a/src/main/java/net/fabricmc/loader/impl/util/version/VersionParser.java b/src/main/java/net/fabricmc/loader/impl/util/version/VersionParser.java index 55a6ac273..8e444a82a 100644 --- a/src/main/java/net/fabricmc/loader/impl/util/version/VersionParser.java +++ b/src/main/java/net/fabricmc/loader/impl/util/version/VersionParser.java @@ -31,6 +31,7 @@ public static Version parse(String s, boolean storeX) throws VersionParsingExcep try { version = new SemanticVersionImpl(s, storeX); } catch (VersionParsingException e) { + System.err.println(e.getMessage()); version = new StringVersion(s); }