Fixed #2449 / Fixed #2456 / Fixed #2458 / Fixed #2459 / Fixed #2466 / Fixed #2474

This commit is contained in:
Anuken
2020-09-01 11:34:03 -04:00
parent 6e3162aec2
commit 8e17571824
20 changed files with 129 additions and 83 deletions
+5 -1
View File
@@ -425,6 +425,7 @@ public class Mods implements Loadable{
/** This must be run on the main thread! */
public void loadScripts(){
Time.mark();
boolean[] any = {false};
try{
eachEnabled(mod -> {
@@ -438,6 +439,7 @@ public class Mods implements Loadable{
if(scripts == null){
scripts = platform.createScripts();
}
any[0] = true;
scripts.run(mod, main);
}catch(Throwable e){
Core.app.post(() -> {
@@ -454,7 +456,9 @@ public class Mods implements Loadable{
content.setCurrentMod(null);
}
Log.info("Time to initialize modded scripts: @", Time.elapsed());
if(any[0]){
Log.info("Time to initialize modded scripts: @", Time.elapsed());
}
}
/** Creates all the content found in mod files. */