From cfeebf781090144c9d2c67706e82941932d95444 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 30 Oct 2013 22:46:19 -0400 Subject: [PATCH] Fix up duplicate entries --- fml/common/cpw/mods/fml/common/ModAPIManager.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fml/common/cpw/mods/fml/common/ModAPIManager.java b/fml/common/cpw/mods/fml/common/ModAPIManager.java index eb714c941..50df55f8a 100644 --- a/fml/common/cpw/mods/fml/common/ModAPIManager.java +++ b/fml/common/cpw/mods/fml/common/ModAPIManager.java @@ -102,8 +102,10 @@ public class ModAPIManager { public void addAPIReference(String embedded) { - currentReferents.add(embedded); - referredMods.add(VersionParser.parseVersionReference(embedded)); + if (currentReferents.add(embedded)) + { + referredMods.add(VersionParser.parseVersionReference(embedded)); + } } public void addOwnedPackage(String apiPackage) @@ -148,6 +150,10 @@ public class ModAPIManager { for (ModContainer mc : data.getCandidate().getContainedMods()) { String embeddedIn = mc.getModId(); + if (container.currentReferents.contains(embeddedIn)) + { + continue; + } FMLLog.fine("Found API %s (owned by %s providing %s) embedded in %s",apiPackage, apiOwner, providedAPI, embeddedIn); if (!embeddedIn.equals(apiOwner)) {