diff --git a/fml/common/cpw/mods/fml/common/FMLModContainer.java b/fml/common/cpw/mods/fml/common/FMLModContainer.java index fb2d132eb..69b97fe1f 100644 --- a/fml/common/cpw/mods/fml/common/FMLModContainer.java +++ b/fml/common/cpw/mods/fml/common/FMLModContainer.java @@ -431,26 +431,31 @@ public class FMLModContainer implements ModContainer String expectedFingerprint = (String) descriptor.get("certificateFingerprint"); fingerprintNotPresent = true; - if (expectedFingerprint!=null && expectedFingerprint != "" && !sourceFingerprints.contains(expectedFingerprint)) + + if (expectedFingerprint != null && !expectedFingerprint.isEmpty()) { - Level warnLevel = Level.SEVERE; - if (source.isDirectory()) + if (!sourceFingerprints.contains(expectedFingerprint)) { - warnLevel = Level.FINER; + Level warnLevel = Level.SEVERE; + if (source.isDirectory()) + { + warnLevel = Level.FINER; + } + FMLLog.log(warnLevel, "The mod %s is expecting signature %s for source %s, however there is no signature matching that description", getModId(), expectedFingerprint, source.getName()); + } + else + { + certificate = certificates[certList.indexOf(expectedFingerprint)]; + fingerprintNotPresent = false; } - FMLLog.log(warnLevel, "The mod %s is expecting signature %s for source %s, however there is no signature matching that description", getModId(), expectedFingerprint, source.getName()); - } - else - { - certificate = certificates[certList.indexOf(expectedFingerprint)]; - fingerprintNotPresent = false; } + annotations = gatherAnnotations(clazz); isNetworkMod = FMLNetworkHandler.instance().registerNetworkMod(this, clazz, event.getASMHarvestedData()); modInstance = clazz.newInstance(); if (fingerprintNotPresent) { - eventBus.post(new FMLFingerprintViolationEvent(source.isDirectory(), source, ImmutableSet.copyOf(this.sourceFingerprints))); + eventBus.post(new FMLFingerprintViolationEvent(source.isDirectory(), source, ImmutableSet.copyOf(this.sourceFingerprints), expectedFingerprint)); } ProxyInjector.inject(this, event.getASMHarvestedData(), FMLCommonHandler.instance().getSide()); processFieldAnnotations(event.getASMHarvestedData()); diff --git a/fml/common/cpw/mods/fml/common/event/FMLFingerprintViolationEvent.java b/fml/common/cpw/mods/fml/common/event/FMLFingerprintViolationEvent.java index c5d98747e..8d2d96663 100644 --- a/fml/common/cpw/mods/fml/common/event/FMLFingerprintViolationEvent.java +++ b/fml/common/cpw/mods/fml/common/event/FMLFingerprintViolationEvent.java @@ -12,12 +12,14 @@ public class FMLFingerprintViolationEvent extends FMLEvent { public final boolean isDirectory; public final Set fingerprints; public final File source; + public final String expectedFingerprint; - public FMLFingerprintViolationEvent(boolean isDirectory, File source, ImmutableSet fingerprints) + public FMLFingerprintViolationEvent(boolean isDirectory, File source, ImmutableSet fingerprints, String expectedFingerprint) { super(); this.isDirectory = isDirectory; this.source = source; this.fingerprints = fingerprints; + this.expectedFingerprint = expectedFingerprint; } }