@@ -72,7 +72,7 @@ export interface PostProcessOptions extends SpawnJavaOptions {
72
72
handler ?: ( postProcessor : PostProcessor ) => Promise < boolean >
73
73
onPostProcessFailed ?: ( proc : PostProcessor , jar : string , classPaths : string , mainClass : string , args : string [ ] , error : unknown ) => void
74
74
onPostProcessSuccess ?: ( proc : PostProcessor , jar : string , classPaths : string , mainClass : string , args : string [ ] ) => void
75
- customPostProcessTask ?: ( processor : PostProcessor [ ] , minecraftFolder : MinecraftFolder , options : PostProcessOptions ) => Task < void >
75
+ customPostProcessTask ?: ( processor : PostProcessor [ ] , minecraftFolder : MinecraftFolder , options : PostProcessOptions , originalTask : ( ) => Task < void > ) => Task < void >
76
76
}
77
77
78
78
export interface InstallProfileOption extends LibraryOptions , InstallSideOption , PostProcessOptions {
@@ -268,7 +268,7 @@ export function installByProfileTask(installProfile: InstallProfile, minecraft:
268
268
await this . yield ( new InstallLibraryTask ( installRequiredLibs , minecraftFolder , options ) )
269
269
270
270
if ( options . customPostProcessTask ) {
271
- await this . yield ( options . customPostProcessTask ( processor , minecraftFolder , options ) )
271
+ await this . yield ( options . customPostProcessTask ( processor , minecraftFolder , options , ( ) => new PostProcessingTask ( processor , minecraftFolder , options ) ) )
272
272
} else {
273
273
await this . yield ( new PostProcessingTask ( processor , minecraftFolder , options ) )
274
274
}
0 commit comments