aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java b/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java
index c96e8141..549200ab 100644
--- a/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java
+++ b/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java
@@ -139,7 +139,12 @@ public final class TransitiveAccessWidenerMappingsProcessor {
comment += "\n";
}
- comment += "Access widened by %s to %s".formatted(modId(), access);
+ String awComment = "Access widened by %s to %s".formatted(modId(), access);
+
+ if (!comment.contains(awComment)) {
+ // Ensure we don't comment the same thing twice. A bit of a cheap way to do this, but should work ok.
+ comment += awComment;
+ }
return comment;
}