Expose the ModFile in the scan data, so languages can read it and make

mod construction decisions.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-01-31 23:09:26 -05:00
parent d2a3b5bed8
commit 55691fce4e
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7
2 changed files with 2 additions and 1 deletions

View file

@ -272,7 +272,7 @@ project(':forge') {
installer 'cpw.mods:modlauncher:0.9.+'
installer 'net.minecraftforge:accesstransformers:0.14.+:shadowed'
installer 'net.minecraftforge:eventbus:0.6.+:service'
installer 'net.minecraftforge:forgespi:0.5.+'
installer 'net.minecraftforge:forgespi:0.6.+'
installer 'net.minecraftforge:coremods:0.2.+'
installer 'com.electronwill.night-config:core:3.4.2'
installer 'com.electronwill.night-config:toml:3.4.2'

View file

@ -41,6 +41,7 @@ public class Scanner {
public ModFileScanData scan() {
ModFileScanData result = new ModFileScanData();
result.addModFileInfo(fileToScan.getModFileInfo());
fileToScan.scanFile(p -> fileVisitor(p, result));
final IModLanguageProvider loader = fileToScan.getLoader();
LOGGER.debug(SCAN, "Scanning {} with language loader {}", fileToScan.getFilePath(), loader.name());