Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d7c4b5d
支持 unlisted-versions-of-minecraft
zkitefly Aug 20, 2024
558cdcb
update
zkitefly Aug 20, 2024
db3530d
update
zkitefly Aug 20, 2024
802a223
update
zkitefly Aug 20, 2024
7832a8c
修改筛选器
zkitefly Aug 20, 2024
f8b045a
Fix
zkitefly Aug 20, 2024
e5a81b5
修复 2.0 的愚人节版本分类
zkitefly Aug 20, 2024
e28513a
Update Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
zkitefly Aug 20, 2024
9c5d2f0
修复标签为 pending 时错误分类的问题
zkitefly Aug 20, 2024
fae7b56
gitcode.com 不要多线程
zkitefly Aug 20, 2024
3917adc
Merge branch 'uvmc' of https://github.com/zkitefly/PCL2 into uvmc
zkitefly Aug 20, 2024
8411bbd
Fix
zkitefly Aug 20, 2024
fddf519
Fix
zkitefly Aug 20, 2024
ad797b6
Uvmc test (#1)
zkitefly Aug 20, 2024
a81b321
point -> .
zkitefly Aug 20, 2024
76d0f01
Uvmc test (#2)
zkitefly Aug 29, 2024
f4fb085
Update ModMinecraft.vb
zkitefly Aug 31, 2024
c4b59de
防止误判
zkitefly Aug 31, 2024
7965ca8
Update ModDownload.vb
zkitefly Aug 31, 2024
72357c7
Merge remote-tracking branch 'upstream/main' into uvmc
zkitefly Sep 21, 2024
79005a1
Update ModDownload.vb
zkitefly Sep 21, 2024
3491e4e
Update Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb
zkitefly Sep 21, 2024
499dba5
Update Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb
zkitefly Sep 21, 2024
4561a71
Update ModDownload.vb
zkitefly Sep 21, 2024
290bee7
Merge branch 'main' into uvmc
zkitefly Oct 25, 2024
7f1de5d
Update Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
zkitefly Oct 25, 2024
ae87513
Update Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
zkitefly Oct 26, 2024
3e86c84
Update Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
zkitefly Oct 27, 2024
5a9cd80
Update ModMinecraft.vb
zkitefly Nov 9, 2024
17863d5
update link
zkitefly Nov 22, 2024
72ebd5f
update download list type
zkitefly Nov 22, 2024
5fc5133
Merge branch 'main' into uvmc
zkitefly Nov 22, 2024
e68b0d1
Update ModNet.vb
zkitefly Nov 22, 2024
0911e52
Merge branch 'main' into uvmc
zkitefly Jan 25, 2025
6d7609a
update
zkitefly Jan 25, 2025
a0bcfc4
update
zkitefly Jan 25, 2025
9a65c33
update
zkitefly Apr 18, 2025
ec2ca82
Merge branch 'main' into uvmc-pcl-main
zkitefly Apr 19, 2025
6b476bc
Update ModDownload.vb
zkitefly Apr 19, 2025
83f9231
Update ModDownload.vb
zkitefly Jul 30, 2025
b9e8b95
Merge branch 'main' into uvmc-pcl-main
zkitefly Jul 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Plain Craft Launcher 2/Modules/Base/ModNet.vb
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ StartSingleThreadDownload:
'是否禁用多线程,以及规定碎片大小
Dim TargetUrl As String = GetSource().Url
If TargetUrl.Contains("pcl2-server") OrElse TargetUrl.Contains("bmclapi") OrElse TargetUrl.Contains("github.com") OrElse
TargetUrl.Contains("optifine.net") OrElse TargetUrl.Contains("modrinth") Then Return Nothing
TargetUrl.Contains("optifine.net") OrElse TargetUrl.Contains("modrinth") OrElse TargetUrl.Contains("gitcode") Then Return Nothing
'寻找最大碎片
'FUTURE: 下载引擎重做,计算下载源平均链接时间和线程下载速度,按最高时间节省来开启多线程
Dim FilePieceMax As NetThread = Threads
Expand Down
45 changes: 36 additions & 9 deletions Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,19 @@
DlPreferMojang = DeltaTime < 4000
Log($"[Download] Mojang 官方源加载耗时:{DeltaTime}ms,{If(DlPreferMojang, "可优先使用官方源", "不优先使用官方源")}")
End If
'添加 PCL 特供项
If File.Exists(PathTemp & "Cache\download.json") Then Versions.Merge(GetJson(ReadFile(PathTemp & "Cache\download.json")))
'添加 UVMC 项
Dim CacheFilePath As String = PathTemp & "Cache\uvmc-download.json"
If Not File.Exists(CacheFilePath) Then
Try
Dim UnlistedJson As JObject = NetGetCodeByRequestRetry("https://zkitefly.github.io/unlisted-versions-of-minecraft/version_manifest.json", IsJson:=True)
File.WriteAllText(CacheFilePath, UnlistedJson.ToString())
Catch ex As Exception
Log("[Download] 未列出的版本官方源下载失败: " & ex.Message)
End Try
Else
Dim CachedJson As JObject = GetJson(ReadFile(CacheFilePath))
Versions.Merge(CachedJson("versions"))
End If
'返回
Loader.Output = New DlClientListResult With {.IsOfficial = True, .SourceName = "Mojang 官方源", .Value = Json}
'解析更新提示(Release)
Expand Down Expand Up @@ -239,8 +250,19 @@
Try
Dim Versions As JArray = Json("versions")
If Versions.Count < 200 Then Throw New Exception("获取到的版本列表长度不足(" & Json.ToString & ")")
'添加 PCL 特供项
If File.Exists(PathTemp & "Cache\download.json") Then Versions.Merge(GetJson(ReadFile(PathTemp & "Cache\download.json")))
'添加 UVMC 项
Dim CacheFilePath As String = PathTemp & "Cache\uvmc-download.json"
If Not File.Exists(CacheFilePath) Then
Try
Dim UnlistedJson As JObject = NetGetCodeByRequestRetry("https://vip.123pan.cn/1821946486/unlisted-versions-of-minecraft/version_manifest.json", IsJson:=True)
File.WriteAllText(CacheFilePath, UnlistedJson.ToString())
Catch ex As Exception
Log("[Download] 未列出的版本镜像源下载失败: " & ex.Message)
End Try
Else
Dim CachedJson As JObject = GetJson(ReadFile(CacheFilePath))
Versions.Merge(CachedJson("versions"))
End If
'检查是否有要求的版本(#5195)
If Not String.IsNullOrEmpty(Loader.Input) Then
Dim Id = Loader.Input
Expand Down Expand Up @@ -1194,23 +1216,27 @@
Original.
Replace("https://piston-data.mojang.com", "https://bmclapi2.bangbang93.com/maven").
Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com/maven").
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/maven"),
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/maven").
Replace("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://alist.8mi.tech/d/mirror/unlisted-versions-of-minecraft/Auto"),
Original.
Replace("https://piston-data.mojang.com", "https://bmclapi2.bangbang93.com/libraries").
Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com/libraries").
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/libraries")
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/libraries").
Replace("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://alist.8mi.tech/d/mirror/unlisted-versions-of-minecraft/Auto")
}
Else
Return DlSourceOrder(
{Original},
{Original.
Replace("https://piston-data.mojang.com", "https://bmclapi2.bangbang93.com/maven").
Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com/maven").
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/maven"),
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/maven").
Replace("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://alist.8mi.tech/d/mirror/unlisted-versions-of-minecraft/Auto"),
Original.
Replace("https://piston-data.mojang.com", "https://bmclapi2.bangbang93.com/libraries").
Replace("https://piston-meta.mojang.com", "https://bmclapi2.bangbang93.com/libraries").
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/libraries")
Replace("https://libraries.minecraft.net", "https://bmclapi2.bangbang93.com/libraries").
Replace("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://alist.8mi.tech/d/mirror/unlisted-versions-of-minecraft/Auto")
})
End If
End Function
Expand All @@ -1226,7 +1252,8 @@
Replace("https://piston-data.mojang.com", "https://bmclapi2.bangbang93.com").
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")
Replace("https://launchermeta.mojang.com", "https://bmclapi2.bangbang93.com").
Replace("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://alist.8mi.tech/d/mirror/unlisted-versions-of-minecraft/Auto")
})
End Function

Expand Down
14 changes: 11 additions & 3 deletions Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Public Module ModMinecraft
Else
ReleaseTime = JsonObject("releaseTime").ToObject(Of Date)
End If
If ReleaseTime.Year > 2000 AndAlso ReleaseTime.Year < 2013 Then
If ReleaseTime.Year > 2000 AndAlso ReleaseTime <= New DateTime(2011, 11, 16) Then ' 2000 年到 2011 年 11 月 16 日之间
_Version.McName = "Old"
GoTo VersionSearchFinish
End If
Expand Down Expand Up @@ -1060,8 +1060,16 @@ ExitDataLoad:
''' </summary>
Public Function GetMcFoolName(Name As String) As String
Name = Name.ToLower
If Name.StartsWithF("2.0") Then
Return "2013 | 这个秘密计划了两年的更新将游戏推向了一个新高度!"
If Name.StartsWithF("2.0") OrElse Name.StartsWithF("2point0") Then
Dim Tag = ""
If Name.EndsWith("red") Then
Tag = "(红色版本)"
ElseIf Name.EndsWith("blue") Then
Tag = "(蓝色版本)"
ElseIf Name.EndsWith("purple") Then
Tag = "(紫色版本)"
End If
Return "2013 | 这个秘密计划了两年的更新将游戏推向了一个新高度!" & Tag
ElseIf Name = "15w14a" Then
Return "2015 | 作为一款全年龄向的游戏,我们需要和平,需要爱与拥抱。"
ElseIf Name = "1.rv-pre1" Then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Public Module ModDownloadLib
Else
NewItem.Info = Entry("lore").ToString
End If
If Entry("url").ToString.Contains("pcl") Then NewItem.Info = "[PCL 特供下载] " & NewItem.Info
If Entry("url").ToString.Contains("unlisted-versions-of-minecraft") Then NewItem.Info = "[UVMC 特供下载] " & NewItem.Info
AddHandler NewItem.Click, OnClick
'建立菜单
If IsSaveOnly Then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@
Not Version("id").ToString.ToLower.Contains("combat") AndAlso
Not Version("id").ToString.ToLower.Contains("rc") AndAlso
Not Version("id").ToString.ToLower.Contains("experimental") AndAlso
Not Version("id").ToString.ToLower.Equals("1.2") AndAlso
Not Version("id").ToString.ToLower.Contains("pre") Then
Type = "正式版"
Version("type") = "release"
End If
'愚人节版本
Select Case Version("id").ToString.ToLower
Case "2point0_blue", "2point0_red", "2point0_purple", "2.0_blue", "2.0_red", "2.0_purple", "2.0"
Type = "愚人节版"
Version("id") = Version("id").ToString().Replace("point", ".")
Version("type") = "special"
Version.Add("lore", GetMcFoolName(Version("id")))
Case "20w14infinite", "20w14∞"
Type = "愚人节版"
Version("id") = "20w14∞"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,18 @@
Not Version("id").ToString.ToLower.Contains("combat") AndAlso
Not Version("id").ToString.ToLower.Contains("rc") AndAlso
Not Version("id").ToString.ToLower.Contains("experimental") AndAlso
Not Version("id").ToString.ToLower.Equals("1.2") AndAlso
Not Version("id").ToString.ToLower.Contains("pre") Then
Type = "正式版"
Version("type") = "release"
End If
'愚人节版本
Select Case Version("id").ToString.ToLower
Case "2point0_blue", "2point0_red", "2point0_purple", "2.0_blue", "2.0_red", "2.0_purple", "2.0"
Type = "愚人节版"
Version("id") = Version("id").ToString().Replace("point", ".")
Version("type") = "special"
Version.Add("lore", GetMcFoolName(Version("id")))
Case "20w14infinite", "20w14∞"
Type = "愚人节版"
Version("id") = "20w14∞"
Expand Down
Loading