public List < URL > scan ( Predicate < String > filter ) { List < URL > discoveredURLs = new ArrayList <> ( 128 ) ; // For each Forge addon... for ( Addon addon : furnace . getAddonRegistry ( ) . getAddons ( AddonFilters . allStarted ( ) ) ) { List < String > filteredResourcePaths = filterAddonResources ( addon , filter ) ; for ( String filePath : filteredResourcePaths ) { URL ruleFile = addon . getClassLoader ( ) . getResource ( filePath ) ; if ( ruleFile != null ) discoveredURLs . add ( ruleFile ) ; } } return discoveredURLs ; }
Scans all Forge addons for files accepted by given filter .