Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public class FMLModContainer implements ModContainer

private String annotationDependencies;
private VersionRange minecraftAccepted;
private boolean hasExpectedFingerprint;
private boolean fingerprintNotPresent;
private Set<String> sourceFingerprints;
private Certificate certificate;
Expand Down Expand Up @@ -179,6 +180,10 @@ private ILanguageAdapter getLanguageAdapter()
return languageAdapter;
}

public boolean hasExpectedFingerprint() {
return hasExpectedFingerprint;
}

public boolean isFingerprintNotPresent() {
return fingerprintNotPresent;
}
Expand Down Expand Up @@ -574,6 +579,7 @@ public void constructMod(FMLConstructionEvent event)

if (expectedFingerprint != null && !expectedFingerprint.isEmpty())
{
hasExpectedFingerprint = true;
if (!sourceFingerprints.contains(expectedFingerprint))
{
Level warnLevel = source.isDirectory() ? Level.TRACE : Level.ERROR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public void printModStates(StringBuilder ret)
mc.getSource().getName()
);

if (mc instanceof FMLModContainer fmc && fmc.isFingerprintNotPresent())
if (mc instanceof FMLModContainer fmc && fmc.hasExpectedFingerprint() && fmc.isFingerprintNotPresent())
potentiallyTamperedMod.add(fmc.getSource().getName());
}

Expand Down