private AssetSource createAssetSource(Name id, Path path) {
if (Files.isRegularFile(path)) {
return new ArchiveSource(id, path.toFile(), TerasologyConstants.ASSETS_SUBDIRECTORY, TerasologyConstants.OVERRIDES_SUBDIRECTORY,
TerasologyConstants.DELTAS_SUBDIRECTORY);
} else {
return new DirectorySource(id, path.resolve(TerasologyConstants.ASSETS_SUBDIRECTORY),
path.resolve(TerasologyConstants.OVERRIDES_SUBDIRECTORY), path.resolve(TerasologyConstants.DELTAS_SUBDIRECTORY));
}
}