File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/main/java/net/minecraftforge/fml/common Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ public class FMLModContainer implements ModContainer
9595
9696 private String annotationDependencies ;
9797 private VersionRange minecraftAccepted ;
98+ private boolean hasExpectedFingerprint ;
9899 private boolean fingerprintNotPresent ;
99100 private Set <String > sourceFingerprints ;
100101 private Certificate certificate ;
@@ -179,6 +180,10 @@ private ILanguageAdapter getLanguageAdapter()
179180 return languageAdapter ;
180181 }
181182
183+ public boolean hasExpectedFingerprint () {
184+ return hasExpectedFingerprint ;
185+ }
186+
182187 public boolean isFingerprintNotPresent () {
183188 return fingerprintNotPresent ;
184189 }
@@ -574,6 +579,7 @@ public void constructMod(FMLConstructionEvent event)
574579
575580 if (expectedFingerprint != null && !expectedFingerprint .isEmpty ())
576581 {
582+ hasExpectedFingerprint = true ;
577583 if (!sourceFingerprints .contains (expectedFingerprint ))
578584 {
579585 Level warnLevel = source .isDirectory () ? Level .TRACE : Level .ERROR ;
Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ public void printModStates(StringBuilder ret)
387387 mc .getSource ().getName ()
388388 );
389389
390- if (mc instanceof FMLModContainer fmc && fmc .isFingerprintNotPresent ())
390+ if (mc instanceof FMLModContainer fmc && fmc .hasExpectedFingerprint () && fmc . isFingerprintNotPresent ())
391391 potentiallyTamperedMod .add (fmc .getSource ().getName ());
392392 }
393393
You can’t perform that action at this time.
0 commit comments