Skip to content

Commit d6575df

Browse files
authored
Merge pull request #6685 from MoYuan-CN/issue/6673
imp(download): 改进可选组件互斥逻辑
2 parents eed6c92 + 3f5392d commit d6575df

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
<local:MyHint Text="必须安装 OptiFabric 才能正常使用 OptiFine!" Margin="0,10,0,0" x:Name="HintOptiFabric" Theme="Red" />
2828
<local:MyHint Text="安装结束后,请在 Mod 下载中搜索 OptiFabric Origins 并下载,否则 OptiFine 会无法使用!" Margin="0,10,0,0" x:Name="HintOptiFabricOld" Theme="Yellow" />
2929
<local:MyHint Text="OptiFine 与一部分 Mod 的兼容性不佳,请谨慎安装。" Margin="0,10,0,0" x:Name="HintModOptiFine" Theme="Yellow" />
30-
<local:MyCard Title="Forge" Height="40" Margin="0,12,0,0" x:Name="CardForge" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
30+
<local:MyHint Text="1.20.5+ 没有 OptiFabric,无法使用 OptiFine,如需加载光影请考虑使用其他 Mod" Margin="0,10,0,0" x:Name="HintModOptiFineHigh" Theme="Blue" />
31+
<local:MyCard Title="Forge" Height="40" Margin="0,12,0,0" x:Name="CardForge" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
3132
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanForge" />
3233
<Grid x:Name="PanForgeInfo" Height="18" Margin="132,11,15,0" VerticalAlignment="Top" Tag="True">
3334
<Grid.RenderTransform>

Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml.vb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@
476476
Else
477477
HintModOptiFine.Visibility = Visibility.Collapsed
478478
End If
479+
If SelectedFabric IsNot Nothing AndAlso VersionSortInteger(SelectedMinecraftId, "1.21.4") > 0 Then
480+
HintModOptiFineHigh.Visibility = Visibility.Visible
481+
Else
482+
HintModOptiFineHigh.Visibility = Visibility.Collapsed
483+
End If
479484
'结束
480485
IsReloading = False
481486
End Sub
@@ -671,6 +676,8 @@
671676
If SelectedNeoForge IsNot Nothing Then Return "与 NeoForge 不兼容"
672677
If LoadOptiFine Is Nothing OrElse LoadOptiFine.State.LoadingState = MyLoading.MyLoadingState.Run Then Return "加载中……"
673678
If LoadOptiFine.State.LoadingState = MyLoading.MyLoadingState.Error Then Return "获取版本列表失败:" & CType(LoadOptiFine.State, Object).Error.Message
679+
'检查 Fabric 1.20.5+:没有 OptiFabric 故全部不兼容
680+
If SelectedFabric IsNot Nothing AndAlso VersionSortInteger(SelectedMinecraftId, "1.20.4") > 0 Then Return "与 Fabric 不兼容"
674681
'检查 Forge 1.13 - 1.14.3:全部不兼容
675682
If SelectedForge IsNot Nothing AndAlso
676683
VersionSortInteger(SelectedMinecraftId, "1.13") >= 0 AndAlso VersionSortInteger("1.14.3", SelectedMinecraftId) >= 0 Then
@@ -981,6 +988,8 @@
981988
Private Function LoadFabricGetError() As String
982989
If LoadFabric Is Nothing OrElse LoadFabric.State.LoadingState = MyLoading.MyLoadingState.Run Then Return "加载中……"
983990
If LoadFabric.State.LoadingState = MyLoading.MyLoadingState.Error Then Return "获取版本列表失败:" & CType(LoadFabric.State, Object).Error.Message
991+
'检查 Fabric 1.20.5+:没有 OptiFabric 故全部不兼容
992+
If SelectedOptiFine IsNot Nothing AndAlso VersionSortInteger(SelectedMinecraftId, "1.20.4") > 0 Then Return "与 OptiFine 不兼容"
984993
For Each Version As JObject In DlFabricListLoader.Output.Value("game")
985994
If Version("version").ToString = SelectedMinecraftId.Replace("∞", "infinite").Replace("Combat Test 7c", "1.16_combat-3") Then
986995
If SelectedForge IsNot Nothing Then Return "与 Forge 不兼容"

0 commit comments

Comments
 (0)