Make sure the server can load client-side mod's for syncing

This commit is contained in:
Frank 2021-08-20 01:52:37 +02:00
parent 14d3c18945
commit 7eb44ebb82
2 changed files with 6 additions and 1 deletions

View file

@ -50,7 +50,7 @@ public class DataExchangeAPI extends DataExchange {
* @param modID - {@link String} modID. * @param modID - {@link String} modID.
*/ */
public static void registerModDependency(String modID) { public static void registerModDependency(String modID) {
if (ModUtil.getModInfo(modID, false) != null) { if (ModUtil.getModInfo(modID, false) != null && !"0.0.0".equals(ModUtil.getModVersion(modID))) {
registerMod(modID); registerMod(modID);
} else { } else {
BCLib.LOGGER.info("Mod Dependency '" + modID + "' not found. This is probably OK."); BCLib.LOGGER.info("Mod Dependency '" + modID + "' not found. This is probably OK.");

View file

@ -104,6 +104,11 @@ public class ModUtil {
.getVersion() .getVersion()
.toString(); .toString();
} }
//not found in loaded mods, lets check the local mods folder
final ModInfo mi = getModInfo(modID, false);
if (mi!=null) return mi.getVersion();
return "0.0.0"; return "0.0.0";
} }