mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 03:59:45 +00:00
Fixes #190. Stop crash if a mod with a required version isn't loaded
This commit is contained in:
1 parent
17ec7edcf5
commit
cac24a8673
1 file changed
+4
-1
@@ -243,6 +243,9 @@ public class ProxyCommon {
|
||||
}
|
||||
|
||||
public boolean isModLoaded(String modname, String versionRangeString) {
|
||||
if (!isModLoaded(modname))
|
||||
return false;
|
||||
|
||||
if (versionRangeString != null) {
|
||||
ModContainer mod = Loader.instance().getIndexedModList().get(modname);
|
||||
ArtifactVersion modVersion = mod.getProcessedVersion();
|
||||
@@ -254,7 +257,7 @@ public class ProxyCommon {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isModLoaded(modname);
|
||||
return true;
|
||||
}
|
||||
|
||||
public Object instantiateIfModLoaded(String modname, String className) {
|
||||
|
||||
Reference in new issue
Block a user