Skip to content

Commit

Permalink
fix: respect resource packs to export cf
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Dec 22, 2020
1 parent 70462f0 commit bf0a121
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/service/InstanceIOService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,13 @@ export default class InstanceIOService extends Service {
} else {
zipTask.addFile(join(instancePath, file), `overrides/${file}`);
}
} else if (file.startsWith('resourcepacks/')) {
const resourcepack = this.state.instance.resourcepacks.find((i) => (i.location.replace('\\', '/') + i.ext) === file);
if (resourcepack && resourcepack.curseforge) {
curseforgeConfig.files.push({ projectID: resourcepack.curseforge.projectId, fileID: resourcepack.curseforge.fileId, required: true });
} else {
zipTask.addFile(join(instancePath, file), `overrides/${file}`);
}
} else {
zipTask.addFile(join(instancePath, file), `overrides/${file}`);
}
Expand Down

0 comments on commit bf0a121

Please sign in to comment.