You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do you not sort the script files. On your ScriptProviderDirectory.java you use the unsorted file list. A simple Arrays.sort(directory) could help. :) On huge modpack projects with many script gets the changes easier.
publicIterator<IScriptIterator> getScripts() {
List<IScriptIterator> scripts = newArrayList<IScriptIterator>();
if (directory.exists()) {
// Arrays.sort(directory); // a simple sort would help herefor (Filefile : directory.listFiles()) {
if (file.isDirectory()) {
scripts.add(newScriptIteratorDirectory(file));
} elseif (file.getName().endsWith(".zs")) {
scripts.add(newScriptIteratorSingle(file));
} elseif (file.getName().endsWith(".zip")) {
try {
scripts.add(newScriptIteratorZip(file));
} catch (IOExceptionex) {
MineTweakerAPI.logError("Could not load " + file.getName() + ": " + ex.getMessage());
}
}
}
}
returnscripts.iterator();
}
The text was updated successfully, but these errors were encountered:
Why do you not sort the script files. On your ScriptProviderDirectory.java you use the unsorted file list. A simple Arrays.sort(directory) could help. :) On huge modpack projects with many script gets the changes easier.
The text was updated successfully, but these errors were encountered: