Skip to content

Commit

Permalink
Move lastClassName outside the if
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Nov 15, 2023
1 parent 6e52be4 commit 03ce87c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ public static void remap(Path js, ModPlatform platform, MappingTree mappings, St
String remapped = CollectionUtil.find(mappings.getClasses(), def -> def.getName(sourceNamespace).equals(className))
.map(def -> def.getName("named"))
.orElse(className);
lastClassName = remapped;

if (!className.equals(remapped)) {
output.set(i, matcher.group(1) + remapped.replace('/', '.') + matcher.group(3));
lastClassName = remapped;
}
} else if (platform == ModPlatform.NEOFORGE && lastClassName != null) {
matcher = REDIRECT_FIELD_TO_METHOD_PATTERN.matcher(line);
Expand Down

0 comments on commit 03ce87c

Please sign in to comment.