Skip to content

Commit

Permalink
Develop beta 27 (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD authored Nov 27, 2023
2 parents cc2d022 + d9cd3ef commit fd56cff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=true

# Versions
versionConnector=1.0.0-beta.26
versionConnector=1.0.0-beta.27
versionAdapter=1.8.16-1.20.1-20231120.221506
versionAdapterDefinition=1.8.19
versionAdapterDefinition=1.8.20

versionMc=1.20.1
versionForge=47.1.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.google.common.collect.Maps;
import com.google.gson.GsonBuilder;
import dev.su5ed.sinytra.adapter.patch.util.MethodQualifier;
import net.minecraftforge.srgutils.IMappingFile;

import java.util.HashMap;
Expand All @@ -14,7 +13,8 @@
import java.util.stream.Collectors;

public class SrgRemappingReferenceMapper {
private static final Pattern FIELD_REF_PATTERN = Pattern.compile("^(?<owner>L[a-zA-Z0-9/_$]+;)?(?<name>[a-zA-Z0-9_]+):(?<desc>.+)$");
private static final Pattern METHOD_REF_PATTERN = Pattern.compile("^(?<owner>L.+?;)?+(?<name>[\\w$<>]+)?(?<desc>\\((?:\\[*(?:[ZCBSIFJD]|L[\\w/$]+;))*\\)(?:\\[*(?:[VZCBSIFJD]|L[\\w/$]+;)))?$");
private static final Pattern FIELD_REF_PATTERN = Pattern.compile("^(?<owner>L[\\w/$]+;)?(?<name>\\w+):(?<desc>.+)$");

private final IMappingFile mappingFile;
private final Map<String, IMappingFile.IMethod> methods;
Expand Down Expand Up @@ -54,7 +54,7 @@ private Map<String, Map<String, String>> remapReferences(Map<String, Map<String,
}

private String remapRef(String reference) {
Matcher methodMatcher = MethodQualifier.METHOD_QUALIFIER_PATTERN.matcher(reference);
Matcher methodMatcher = METHOD_REF_PATTERN.matcher(reference);
if (methodMatcher.matches()) {
return remapRefMapEntry(methodMatcher, "", (name, desc) -> this.methods.get(name + desc));
}
Expand Down

0 comments on commit fd56cff

Please sign in to comment.