@@ -179,6 +179,7 @@ public async Task CheckAndDownloadAsync(MVersion version)
179
179
}
180
180
}
181
181
182
+ // not stable
182
183
public Process CreateProcess ( string mcversion , string forgeversion , MLaunchOption option )
183
184
{
184
185
CheckAndDownload ( GetVersion ( mcversion ) ) ;
@@ -188,27 +189,35 @@ public Process CreateProcess(string mcversion, string forgeversion, MLaunchOptio
188
189
return CreateProcess ( versionName , option ) ;
189
190
}
190
191
191
- public Process CreateProcess ( string versionName , MLaunchOption option )
192
- => CreateProcess ( GetVersion ( versionName ) , option ) ;
192
+ public Process CreateProcess ( string versionName , MLaunchOption option , bool checkAndDownload = true )
193
+ => CreateProcess ( GetVersion ( versionName ) , option , checkAndDownload ) ;
193
194
194
195
[ MethodTimer . Time ]
195
- public Process CreateProcess ( MVersion version , MLaunchOption option )
196
+ public Process CreateProcess ( MVersion version , MLaunchOption option , bool checkAndDownload = true )
196
197
{
197
198
option . StartVersion = version ;
198
- CheckAndDownload ( option . StartVersion ) ;
199
+
200
+ if ( checkAndDownload )
201
+ CheckAndDownload ( option . StartVersion ) ;
202
+
199
203
return CreateProcess ( option ) ;
200
204
}
201
205
202
- public async Task < Process > CreateProcessAsync ( string versionName , MLaunchOption option )
206
+ public async Task < Process > CreateProcessAsync ( string versionName , MLaunchOption option ,
207
+ bool checkAndDownload = true )
203
208
{
204
209
var version = await GetVersionAsync ( versionName ) . ConfigureAwait ( false ) ;
205
- return await CreateProcessAsync ( version , option ) . ConfigureAwait ( false ) ;
210
+ return await CreateProcessAsync ( version , option , checkAndDownload ) . ConfigureAwait ( false ) ;
206
211
}
207
212
208
- public async Task < Process > CreateProcessAsync ( MVersion version , MLaunchOption option )
213
+ public async Task < Process > CreateProcessAsync ( MVersion version , MLaunchOption option ,
214
+ bool checkAndDownload = true )
209
215
{
210
216
option . StartVersion = version ;
211
- await CheckAndDownloadAsync ( option . StartVersion ) . ConfigureAwait ( false ) ;
217
+
218
+ if ( checkAndDownload )
219
+ await CheckAndDownloadAsync ( option . StartVersion ) . ConfigureAwait ( false ) ;
220
+
212
221
return await CreateProcessAsync ( option ) . ConfigureAwait ( false ) ;
213
222
}
214
223
0 commit comments