fix: creating pack not resetting modloader when switched back to none

This commit is contained in:
Ryan Dowling 2024-01-14 14:24:38 +11:00
parent 9c480e95a4
commit 859e033503
No known key found for this signature in database
GPG key ID: 5539FCDB88950EFD
2 changed files with 5 additions and 2 deletions

View file

@ -8,6 +8,7 @@ This changelog only contains the changes that are unreleased. For changes for in
### New Features
### Fixes
- Creating pack not resetting modloader when switched back to none
### Misc
- Remove old FTB pack installing code

View file

@ -411,6 +411,7 @@ public class CreatePackViewModel implements SettingsListener, ICreatePackViewMod
updateNameAndDescription(selectedMinecraftVersionOptional.get(), null);
loaderVersions.onNext(Optional.empty());
setLoaderGroupEnabled(true);
selectedLoaderVersion.onNext(Optional.empty());
loaderVersionsDropDownEnabled.onNext(false);
return;
}
@ -445,10 +446,11 @@ public class CreatePackViewModel implements SettingsListener, ICreatePackViewMod
if (!loaders.isEmpty()) {
if (loaderType == LoaderType.FORGE) {
Optional<LoaderVersion> optionalLoaderType = first(loaders, it -> it.recommended);
if (optionalLoaderType.isPresent())
if (optionalLoaderType.isPresent()) {
selectedLoaderVersion.onNext(optionalLoaderType);
else
} else {
selectedLoaderVersion.onNext(loaders.stream().findFirst());
}
} else {
selectedLoaderVersion.onNext(loaders.stream().findFirst());
}