Fix #3295: 修复离线账户选择 Steve/Alex 皮肤时模型错误的问题 (#3626)

* Fix #3295: 修复离线账户选择 Steve/Alex 皮肤时模型错误的问题

* update
This commit is contained in:
Glavo 2025-02-18 22:46:52 +08:00 committed by GitHub
parent 554ecfd6d5
commit d5ab14f476
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -201,6 +201,12 @@ public class OfflineAccountSkinPane extends StackPane {
} }
private Skin getSkin() { private Skin getSkin() {
return new Skin(skinItem.getSelectedData(), cslApiField.getText(), modelCombobox.getValue(), skinSelector.getValue(), capeSelector.getValue()); Skin.Type type = skinItem.getSelectedData();
if (type == Skin.Type.LOCAL_FILE) {
return new Skin(type, cslApiField.getText(), modelCombobox.getValue(), skinSelector.getValue(), capeSelector.getValue());
} else {
String cslApi = type == Skin.Type.CUSTOM_SKIN_LOADER_API ? cslApiField.getText() : null;
return new Skin(type, cslApi, null, null, null);
}
} }
} }