// Load the module configuration file.
File modJsonFile = new File(modDir, MOD_JSON_FILE);
ModuleInfo info = loadModuleInfo(modID, modJsonFile);
// Pull in all dependencies according to the "includes" and "deploys" fields.
ModuleFields fields = info.fields();
List<String> mods = new ArrayList<>();
// Add "includes" modules.
String sincludes = fields.getIncludes();
if (sincludes != null) {
String[] includes = parseIncludes(sincludes);
if (includes != null) {
mods.addAll(Arrays.asList(includes));
}
}
// Add "deploys" modules.
String sdeploys = fields.getDeploys();
if (sdeploys != null) {
String[] deploys = parseIncludes(sdeploys);
if (deploys != null) {
mods.addAll(Arrays.asList(deploys));
}