龙腾猫跃 %!s(int64=3) %!d(string=hai) anos
pai
achega
41250d8387

+ 34 - 1
Plain Craft Launcher 2/Controls/MyHint.xaml.vb

@@ -49,7 +49,6 @@
     End Property
 
     Public RelativeSetup As String = ""
-
     Private Sub MyHint_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
         If CanClose AndAlso Setup.Get(RelativeSetup) Then
             Visibility = Visibility.Collapsed
@@ -60,6 +59,40 @@
         AniDispose(Me, False)
     End Sub
 
+    '触发点击事件
+    Private IsMouseDown As Boolean = False
+    Private Sub MyHint_MouseUp(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonUp
+        If Not IsMouseDown Then Return
+        IsMouseDown = False
+        Log("[Control] 按下提示条" & If(String.IsNullOrEmpty(Name), "", ":" & Name))
+        e.Handled = True
+        ModEvent.TryStartEvent(EventType, EventData)
+    End Sub
+    Private Sub MyHint_MouseDown(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonDown
+        IsMouseDown = True
+    End Sub
+    Private Sub MyHint_MouseLeave() Handles Me.MouseLeave
+        IsMouseDown = False
+    End Sub
+    Public Property EventType As String
+        Get
+            Return GetValue(EventTypeProperty)
+        End Get
+        Set(value As String)
+            SetValue(EventTypeProperty, value)
+        End Set
+    End Property
+    Public Shared ReadOnly EventTypeProperty As DependencyProperty = DependencyProperty.Register("EventType", GetType(String), GetType(MyHint), New PropertyMetadata(Nothing))
+    Public Property EventData As String
+        Get
+            Return GetValue(EventDataProperty)
+        End Get
+        Set(value As String)
+            SetValue(EventDataProperty, value)
+        End Set
+    End Property
+    Public Shared ReadOnly EventDataProperty As DependencyProperty = DependencyProperty.Register("EventData", GetType(String), GetType(MyHint), New PropertyMetadata(Nothing))
+
 End Class
 Partial Public Module ModAnimation
     Public Sub AniDispose(Control As MyHint, RemoveFromChildren As Boolean, Optional CallBack As ParameterizedThreadStart = Nothing)

+ 14 - 0
Plain Craft Launcher 2/FormMain.xaml.vb

@@ -10,6 +10,15 @@ Public Class FormMain
         Dim FeatureList As New List(Of KeyValuePair(Of Integer, String))
         '统计更新日志条目
 #If BETA Then
+        If LastVersion < 300 Then 'Release 2.6.6
+            FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "修复网络条件差时可能无法下载 MC 的 Bug"))
+            FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "支持选择多种预设的主页"))
+            FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "Mod 管理中允许多选 Mod 进行批量操作"))
+            FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "优化崩溃分析,添加多种崩溃情况的判断"))
+            FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "优化联网获取的主页的加载与缓存"))
+            FeatureCount += 40
+            BugCount += 34
+        End If
         If LastVersion < 296 Then 'Release 2.6.3
             FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "新增内存优化功能,可以将所有程序的物理内存占用降低约 1/3"))
             FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "在选择 OptiFine 与 Fabric 后会自动选择 OptiFabric"))
@@ -116,6 +125,11 @@ Public Class FormMain
         '3:BUG+ IMP* FEAT-
         '2:BUG* IMP-
         '1:BUG-
+        If LastVersion < 301 Then 'Snapshot 2.6.6
+            FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "修复网络条件差时可能无法下载 MC 的 Bug"))
+            FeatureCount += 4
+            BugCount += 2
+        End If
         If LastVersion < 299 Then 'Snapshot 2.6.5
             FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "支持选择多种预设的主页"))
             FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "优化联网获取的主页的加载与缓存"))

+ 4 - 4
Plain Craft Launcher 2/Modules/Base/ModBase.vb

@@ -11,12 +11,12 @@ Public Module ModBase
 #Region "声明"
 
     '下列版本信息由更新器自动修改
-    Public Const VersionBaseName As String = "2.6.5" '不含分支前缀的显示用版本名
-    Public Const VersionStandardCode As String = "2.6.5." & VersionBranchCode '标准格式的四段式版本号
+    Public Const VersionBaseName As String = "2.6.6" '不含分支前缀的显示用版本名
+    Public Const VersionStandardCode As String = "2.6.6." & VersionBranchCode '标准格式的四段式版本号
 #If BETA Then
-    Public Const VersionCode As Integer = 296 'Release
+    Public Const VersionCode As Integer = 300 'Release
 #Else
-    Public Const VersionCode As Integer = 299 'Snapshot
+    Public Const VersionCode As Integer = 301 'Snapshot
 #End If
     '自动生成的版本信息
     Public Const VersionDisplayName As String = VersionBranchName & " " & VersionBaseName

+ 2 - 2
Plain Craft Launcher 2/Modules/Minecraft/ModComp.vb

@@ -421,7 +421,7 @@
             Dim NewItem As New MyCompItem With {.Tag = Me}
             '整理 FinalName 与 ExNameList
             '检查下列代码时可以参考 #1567 的测试例
-            Dim FinalName As String
+            Dim FinalName As String = RawName
             Dim ExNameList As List(Of String)
             If TranslatedName = RawName Then
                 '没有中文翻译
@@ -476,7 +476,7 @@
             '显示 FinalName 与 ExNameList
             If ExNameList.Count = 0 Then
 NoExName:
-                NewItem.LabTitle.Text = RawName
+                NewItem.LabTitle.Text = FinalName
                 CType(NewItem.LabTitleRaw.Parent, StackPanel).Children.Remove(NewItem.LabTitleRaw)
             Else
                 NewItem.LabTitle.Text = FinalName

+ 12 - 19
Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb

@@ -52,7 +52,7 @@
         If IndexUrl = "" Then
             Return Nothing
         Else
-            Return New NetFile(DlSourceLauncherOrMetaGet(IndexUrl, False), IndexAddress, New FileChecker(CanUseExistsFile:=False, IsJson:=True))
+            Return New NetFile(DlSourceLauncherOrMetaGet(IndexUrl), IndexAddress, New FileChecker(CanUseExistsFile:=False, IsJson:=True))
         End If
     End Function
 
@@ -960,34 +960,27 @@
 
     Public Function DlSourceResourceGet(MojangBase As String) As String()
         MojangBase = MojangBase.Replace("http://resources.download.minecraft.net", "https://resources.download.minecraft.net")
-        Return {MojangBase.Replace("https://resources.download.minecraft.net", "https://download.mcbbs.net/assets"),
+        Return {MojangBase.Replace("https://piston-meta.mojang.com", "https://download.mcbbs.net/assets").Replace("https://resources.download.minecraft.net", "https://download.mcbbs.net/assets"),
                 MojangBase,
-                MojangBase.Replace("https://resources.download.minecraft.net", "https://bmclapi2.bangbang93.com/assets")
+                MojangBase.Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com/assets").Replace("https://resources.download.minecraft.net", "https://bmclapi2.bangbang93.com/assets")
                }
     End Function
 
     Public Function DlSourceLibraryGet(MojangBase As String) As String()
-        Return {MojangBase.Replace("https://libraries.minecraft.net", "https://download.mcbbs.net/maven"),
-                MojangBase.Replace("https://libraries.minecraft.net", "https://download.mcbbs.net/libraries"),
+        Return {MojangBase.Replace("https://piston-meta.mojang.com", "https://download.mcbbs.net/maven").Replace("https://libraries.minecraft.net", "https://download.mcbbs.net/maven"),
+                MojangBase.Replace("https://piston-meta.mojang.com", "https://download.mcbbs.net/libraries").Replace("https://libraries.minecraft.net", "https://download.mcbbs.net/libraries"),
                 MojangBase,
-                MojangBase.Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/maven"),
-                MojangBase.Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/libraries")
+                MojangBase.Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com/maven").Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/maven"),
+                MojangBase.Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com/libraries").Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/libraries")
                }
     End Function
 
-    Public Function DlSourceLauncherOrMetaGet(MojangBase As String, Optional IsStatic As Boolean = True) As String()
+    Public Function DlSourceLauncherOrMetaGet(MojangBase As String) As String()
         If MojangBase Is Nothing Then Throw New Exception("无对应的 json 下载地址")
-        If IsStatic Then
-            Return {MojangBase.Replace("https://launcher.mojang.com", "https://download.mcbbs.net").Replace("https://launchermeta.mojang.com", "https://download.mcbbs.net"),
-                    MojangBase,
-                    MojangBase.Replace("https://launcher.mojang.com", "https://bmclapi2.bangbang93.com").Replace("https://launchermeta.mojang.com", "https://bmclapi2.bangbang93.com")
-                   }
-        Else
-            Return {MojangBase.Replace("https://launcher.mojang.com", "https://download.mcbbs.net").Replace("https://launchermeta.mojang.com", "https://download.mcbbs.net"),
-                    MojangBase,
-                    MojangBase.Replace("https://launcher.mojang.com", "https://bmclapi2.bangbang93.com").Replace("https://launchermeta.mojang.com", "https://bmclapi2.bangbang93.com")
-                   }
-        End If
+        Return {MojangBase.Replace("https://piston-meta.mojang.com", "https://download.mcbbs.net").Replace("https://launcher.mojang.com", "https://download.mcbbs.net").Replace("https://launchermeta.mojang.com", "https://download.mcbbs.net"),
+                MojangBase,
+                MojangBase.Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com").Replace("https://launcher.mojang.com", "https://bmclapi2.bangbang93.com").Replace("https://launchermeta.mojang.com", "https://bmclapi2.bangbang93.com")
+               }
     End Function
 
     Private Sub DlSourceLoader(Of InputType, OutputType)(MainLoader As LoaderTask(Of InputType, OutputType),

+ 2 - 2
Plain Craft Launcher 2/My Project/AssemblyInfo.vb

@@ -51,6 +51,6 @@ Imports System.Runtime.InteropServices
 ' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
 ' 方法是按如下所示使用“*”
 
-<Assembly: AssemblyVersion("2.6.5.0")>
-<Assembly: AssemblyFileVersion("2.6.5.0")>
+<Assembly: AssemblyVersion("2.6.6.0")>
+<Assembly: AssemblyFileVersion("2.6.6.0")>
 <Assembly: NeutralResourcesLanguage("")>

+ 1 - 0
Plain Craft Launcher 2/Pages/PageDownload/PageDownloadMod.xaml.vb

@@ -114,6 +114,7 @@
         TextSearchName.Text = ""
         TextSearchVersion.Text = "全部 (也可自行输入)"
         TextSearchVersion.SelectedIndex = 0
+        ComboSearchSource.SelectedIndex = 0
         ComboSearchTag.SelectedIndex = 0
         ComboSearchLoader.SelectedIndex = 0
         Loader.LastFinishedTime = 0 '要求强制重新开始

+ 1 - 0
Plain Craft Launcher 2/Pages/PageDownload/PageDownloadPack.xaml.vb

@@ -116,6 +116,7 @@
         TextSearchName.Text = ""
         TextSearchVersion.Text = "全部 (也可自行输入)"
         TextSearchVersion.SelectedIndex = 0
+        ComboSearchSource.SelectedIndex = 0
         ComboSearchTag.SelectedIndex = 0
         Loader.LastFinishedTime = 0 '要求强制重新开始
     End Sub

+ 6 - 2
Plain Craft Launcher 2/Pages/PageLaunch/PageLaunchRight.xaml.vb

@@ -86,7 +86,7 @@ Download:
                             </local:MyCard>"
                     Case 2 '新闻主页
                         Log("[Page] 主页预设:Minecraft 新闻")
-                        Url = "https://news.bugjump.net"
+                        Url = "http://pcl2.mc-news.top"
                         GoTo Download
                 End Select
         End Select
@@ -136,7 +136,11 @@ Download:
             '要求刷新
             Refresh()
         Catch ex As Exception
-            Log(ex, $"联网下载自定义主页失败({Task.Input})", LogLevel.Hint)
+            If Setup.Get("CacheSavedPageVersion") = "" Then
+                Log(ex, $"联网下载自定义主页失败({Task.Input})", LogLevel.Msgbox)
+            Else
+                Log(ex, $"联网下载自定义主页失败({Task.Input})")
+            End If
             Task.Input = ""
         End Try
     End Sub

+ 1 - 1
Plain Craft Launcher 2/Pages/PageSetup/PageSetupLaunch.xaml

@@ -165,7 +165,7 @@
             </local:MyCard>
             <local:MyCard Margin="0,0,0,15" Title="游戏内存">
                 <StackPanel Margin="25,40,25,15">
-                    <local:MyHint x:Name="LabRamWarn" CanClose="False" Text="32 位 Java 最多只能分配 1 GB 内存,建议安装 64 位 Java!" IsWarn="True" Margin="0,0,0,12" />
+                    <local:MyHint x:Name="LabRamWarn" Text="32 位 Java 最多只能分配 1 GB 内存,建议安装 64 位 Java!" IsWarn="True" Margin="0,0,0,12" />
                     <Grid Margin="0,0,0,3">
                         <Grid.ColumnDefinitions>
                             <ColumnDefinition Width="Auto" />

+ 1 - 1
Plain Craft Launcher 2/Pages/PageVersion/PageVersionSetup.xaml

@@ -58,7 +58,7 @@
             </local:MyCard>
             <local:MyCard Margin="0,0,0,15" Title="游戏内存">
                 <StackPanel Margin="25,40,25,15">
-                    <local:MyHint x:Name="LabRamWarn" CanClose="False" Text="32 位 Java 最多只能分配 1 GB 内存,建议安装 64 位 Java!" IsWarn="True" Margin="0,0,0,12" />
+                    <local:MyHint x:Name="LabRamWarn" Text="32 位 Java 最多只能分配 1 GB 内存,建议安装 64 位 Java!" IsWarn="True" Margin="0,0,0,12" />
                     <Grid Margin="0,0,0,3">
                         <Grid.ColumnDefinitions>
                             <ColumnDefinition Width="Auto" />

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 135 - 135
Plain Craft Launcher 2/Resources/ModData.txt


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio