fix null values in the provider map
All checks were successful
Publish to snapshot maven / build (push) Successful in 30s
All checks were successful
Publish to snapshot maven / build (push) Successful in 30s
This commit is contained in:
parent
511eb0c8b0
commit
0165161a9c
|
@ -7,7 +7,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "dev.frogmc"
|
||||
version = "0.0.1-alpha.6"
|
||||
version = "0.0.1-alpha.7"
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
|
|
|
@ -78,11 +78,7 @@ public class FrogLoaderImpl implements FrogLoader {
|
|||
modIds = collectModIds();
|
||||
LOGGER.info(ModUtil.getModList(getMods()));
|
||||
LOGGER.info("Launching...");
|
||||
modProviders.forEach(plugin -> {
|
||||
if (mods.get(plugin.id()) != null) { // we don't like NPEs
|
||||
plugin.preLaunch(mods.get(plugin.id()).values());
|
||||
}
|
||||
});
|
||||
modProviders.forEach(plugin -> plugin.preLaunch(mods.get(plugin.id()).values()));
|
||||
gamePlugin.run();
|
||||
} catch (Throwable t) {
|
||||
LoaderGui.execReport(CrashReportGenerator.writeReport(t, getMods()), false);
|
||||
|
|
|
@ -47,6 +47,7 @@ public class PluginLoader {
|
|||
providers.add(provider);
|
||||
size[0]++;
|
||||
}));
|
||||
modProviders.add(plugin);
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error("Error during plugin initialisation: ", e);
|
||||
}
|
||||
|
@ -61,7 +62,6 @@ public class PluginLoader {
|
|||
c.forEach(p -> map.put(p.id(), p));
|
||||
});
|
||||
modIds.addAll(solved.stream().map(ModProperties::id).toList());
|
||||
modProviders.addAll(providers);
|
||||
} catch (ModDependencyResolver.UnfulfilledDependencyException e) {
|
||||
LoaderGui.execUnfulfilledDep(CrashReportGenerator.writeReport(e, flattened), e, false);
|
||||
} catch (ModDependencyResolver.BreakingModException e) {
|
||||
|
|
Loading…
Reference in a new issue