1
Mods / Re: [0.96a] Scan Those Gates (v1.5.5)
« on: July 24, 2023, 06:17:51 AM »
LunaLib 1.8.0 just got released and hence, running into an error from this mod screaming about needing to update LunaLib to at least 1.7.4.
Took a quick look at the source files, seems to be in the ScannerModPlugin file where there's this boolean check that's erroneously forcing an unnecessary crash. It doesn't account for a "version greater than" situation and continues checking the subsequent conditionals, hence it outputting that 1.8.0 < 1.7.4
Took a quick look at the source files, seems to be in the ScannerModPlugin file where there's this boolean check that's erroneously forcing an unnecessary crash. It doesn't account for a "version greater than" situation and continues checking the subsequent conditionals, hence it outputting that 1.8.0 < 1.7.4
Code
@Override
public void onApplicationLoad() {
if (lunaLibEnabled){
if (requiredLunaLibVersionPresent()) {
addToManagerIfNeeded();
} else {
throw new RuntimeException("Using LunaLib with this mod requires at least version "
+ LUNA_MAJOR + "." + LUNA_MINOR + "." + LUNA_PATCH + " of LunaLib. Update your LunaLib, or else...");
}
}
}
public static boolean requiredLunaLibVersionPresent() {
String version = Global.getSettings().getModManager().getModSpec(LUNALIB_ID).getVersion();
log.info("LunaLib Version: " + version);
String[] temp = version.split("\\.");
if (Integer.parseInt(temp[0]) < LUNA_MAJOR) return false;
if (Integer.parseInt(temp[1]) < LUNA_MINOR) return false;
if (Integer.parseInt(temp[2]) < LUNA_PATCH) return false;
return true;
}