2.12.3
This commit is contained in:
@@ -359,8 +359,38 @@ GroupDone:
|
||||
If Not Instance.IsLoaded Then Instance.Load()
|
||||
'只对 Mod 和数据包进行版本检测
|
||||
If File.Type = CompType.Mod OrElse File.Type = CompType.DataPack Then
|
||||
If File.GameVersions.Any(Function(v) v.Contains(".")) AndAlso
|
||||
Not File.GameVersions.Any(Function(v) v.Contains(".") AndAlso v = Instance.Version.VanillaName) Then Return False
|
||||
If Not File.GameVersions.Any( '判断是否有任何一个版本匹配
|
||||
Function(FileVersion)
|
||||
Dim FileIsSnapshot As Boolean = FileVersion.Contains("预览版") OrElse Not FileVersion.Contains(".")
|
||||
Dim InstanceIsSnapshot As Boolean = Instance.Version.VanillaName.Contains("snapshot") OrElse Not Instance.Version.VanillaName.Contains(".")
|
||||
If FileIsSnapshot <> InstanceIsSnapshot Then
|
||||
'只有一种是预览版
|
||||
Return False
|
||||
ElseIf Not FileIsSnapshot AndAlso Not InstanceIsSnapshot Then
|
||||
'都不是预览版
|
||||
Return FileVersion = Instance.Version.VanillaName
|
||||
Else
|
||||
'都是预览版
|
||||
Dim FileIsNewFormat As Boolean = FileVersion.Contains(".") AndAlso Val(FileVersion.BeforeFirst(".")) > 1
|
||||
Dim InstanceIsNewFormat As Boolean = Instance.Version.Drop > 250
|
||||
If FileIsNewFormat <> InstanceIsNewFormat Then
|
||||
'只有一种是新格式快照
|
||||
Return False
|
||||
ElseIf FileIsNewFormat AndAlso InstanceIsNewFormat Then
|
||||
'都是新格式快照
|
||||
Return FileVersion.BeforeFirst(" ") = Instance.Version.VanillaName.BeforeFirst("-")
|
||||
Else
|
||||
'都是旧格式快照
|
||||
If FileVersion.Contains("w") AndAlso Instance.Version.VanillaName.Contains("w") Then
|
||||
'都是 w 快照
|
||||
Return FileVersion = Instance.Version.VanillaName
|
||||
Else
|
||||
'不全是 w 快照
|
||||
Return True '只能假定相同,无法判断
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Function) Then Return False
|
||||
End If
|
||||
'加载器
|
||||
If Not AllowedLoaders.Any() Then Return True '无要求
|
||||
|
||||
@@ -254,7 +254,7 @@ echo 你可以在 PCL 的 [设置 → 启动选项] 中查看已安装的 java
|
||||
echo ------------------------------
|
||||
echo 如果提示 ""You need to agree to the EULA in order to run the server"",请打开 eula.txt,按说明阅读并同意 Minecraft EULA 后,将该文件最后一行中的 eula=false 改为 eula=true。
|
||||
echo ------------------------------
|
||||
""java"" -server -XX:+UseG1GC -Xmx4096M -Xms1024M -XX:+UseCompressedOops -jar {Id}-server.jar nogui
|
||||
""java"" -server -XX:+UseG1GC -Xmx6144M -Xms1024M -jar {Id}-server.jar nogui
|
||||
echo ----------------------
|
||||
echo 服务端已停止。
|
||||
pause"
|
||||
@@ -2102,7 +2102,7 @@ Retry:
|
||||
Dim OptiFineAsMod As Boolean = Request.OptiFineEntry IsNot Nothing AndAlso Modable '选择了 OptiFine 与任意 Mod 加载器
|
||||
If OptiFineAsMod Then
|
||||
Log("[Download] OptiFine 将作为 Mod 进行下载")
|
||||
If Request.LiteLoaderEntry IsNot Nothing
|
||||
If Request.LiteLoaderEntry IsNot Nothing Then
|
||||
OptiFineFolder = ModsTempFolder & Request.MinecraftName & "\" '#8147
|
||||
Else
|
||||
OptiFineFolder = ModsTempFolder
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<local:ExportOption
|
||||
Title="整合包重要数据"
|
||||
Description="脚本文件、内置资源包、数据包等"
|
||||
Rules="addons/|multiblocked/|modpack-update-checker/|global_packs/|global_resource_packs/|global_data_packs/|optional_data_packs/|moonlight-global-datapacks/|maps/|icon.png|mods-resourcepacks/|matmos/|resource_assorts/|resource_assorts.json|patchouli_books/|datapacks/|kubejs*/|!kubejs*/probe/|!kubejs*/exported/|!kubejs*/jsconfig.json|!kubejs*/README.txt|openloader/|worldshape/|resources/|scripts/|structures/|fontfiles/|oresources/|packmenu/|craftpresence/|pointblanks/|template*/|!template*/playerdata/|!template*/stats/"
|
||||
Rules="hotai/|bansoukou/|addons/|multiblocked/|modpack-update-checker/|global_packs/|global_resource_packs/|global_data_packs/|optional_data_packs/|moonlight-global-datapacks/|maps/|icon.png|mods-resourcepacks/|matmos/|resource_assorts/|resource_assorts.json|patchouli_books/|datapacks/|kubejs*/|!kubejs*/probe/|!kubejs*/exported/|!kubejs*/jsconfig.json|!kubejs*/README.txt|openloader/|worldshape/|resources/|scripts/|structures/|fontfiles/|oresources/|packmenu/|craftpresence/|pointblanks/|template*/|!template*/playerdata/|!template*/stats/"
|
||||
DefaultChecked="True" />
|
||||
</local:MyCheckBox.Tag>
|
||||
</local:MyCheckBox>
|
||||
|
||||
@@ -368,9 +368,7 @@ Public Class PageInstanceExport
|
||||
CheckOptionsPcl.Checked = Ini.GetOrDefault("IncludeLauncher", True)
|
||||
CheckOptionsPclCustom.Checked = Ini.GetOrDefault("IncludeLauncherCustom", True)
|
||||
CheckAdvancedInclude.Checked = Ini.GetOrDefault("DontCheckHostedAssets", False)
|
||||
If Not CheckAdvancedInclude.Checked Then '#7979,加个特判
|
||||
CheckAdvancedModrinth.Checked = Ini.GetOrDefault("ModrinthUploadMode", False)
|
||||
End If
|
||||
If Not CheckAdvancedInclude.Checked Then CheckAdvancedModrinth.Checked = Ini.GetOrDefault("ModrinthUploadMode", False) '#7979,加个特判
|
||||
ConfigPackPath = Ini.GetOrDefault("PackPath", Nothing)
|
||||
'导出内容段
|
||||
RulesOverrides = Segments(1).Replace(vbCr, vbLf).Replace(vbLf & vbLf, vbLf).Split(vbLf).ToList
|
||||
|
||||
@@ -850,22 +850,22 @@ Install:
|
||||
'构造请求
|
||||
Dim QueryList As New List(Of SearchEntry(Of McMod))
|
||||
For Each Entry As McMod In McModLoader.Output
|
||||
Dim SearchSource As New List(Of KeyValuePair(Of String, Double))
|
||||
SearchSource.Add(New KeyValuePair(Of String, Double)(Entry.DisplayName, 1))
|
||||
SearchSource.Add(New KeyValuePair(Of String, Double)(Entry.FileName, 1))
|
||||
Dim SearchSources As New List(Of SearchSource)
|
||||
SearchSources.Add(New SearchSource(Entry.DisplayName, 1))
|
||||
SearchSources.Add(New SearchSource(Entry.FileName, 1))
|
||||
If Entry.Version IsNot Nothing Then
|
||||
SearchSource.Add(New KeyValuePair(Of String, Double)(Entry.Version, 0.2))
|
||||
SearchSources.Add(New SearchSource(Entry.Version, 0.2))
|
||||
End If
|
||||
If Entry.Description IsNot Nothing AndAlso Entry.Description <> "" Then
|
||||
SearchSource.Add(New KeyValuePair(Of String, Double)(Entry.Description, 0.4))
|
||||
SearchSources.Add(New SearchSource(Entry.Description, 0.4))
|
||||
End If
|
||||
If Entry.Comp IsNot Nothing Then
|
||||
If Entry.Comp.RawName <> Entry.DisplayName Then SearchSource.Add(New KeyValuePair(Of String, Double)(Entry.Comp.RawName, 1))
|
||||
If Entry.Comp.TranslatedName <> Entry.Comp.RawName Then SearchSource.Add(New KeyValuePair(Of String, Double)(Entry.Comp.TranslatedName, 1))
|
||||
If Entry.Comp.Description <> Entry.Description Then SearchSource.Add(New KeyValuePair(Of String, Double)(Entry.Comp.Description, 0.4))
|
||||
SearchSource.Add(New KeyValuePair(Of String, Double)(String.Join("", Entry.Comp.Tags), 0.2))
|
||||
If Entry.Comp.RawName <> Entry.DisplayName Then SearchSources.Add(New SearchSource(Entry.Comp.RawName, 1))
|
||||
If Entry.Comp.TranslatedName <> Entry.Comp.RawName Then SearchSources.Add(New SearchSource(Entry.Comp.TranslatedName, 1))
|
||||
If Entry.Comp.Description <> Entry.Description Then SearchSources.Add(New SearchSource(Entry.Comp.Description, 0.4))
|
||||
SearchSources.Add(New SearchSource(String.Join("", Entry.Comp.Tags), 0.2))
|
||||
End If
|
||||
QueryList.Add(New SearchEntry(Of McMod) With {.Item = Entry, .SearchSource = SearchSource})
|
||||
QueryList.Add(New SearchEntry(Of McMod) With {.Item = Entry, .SearchSource = SearchSources})
|
||||
Next
|
||||
'进行搜索
|
||||
SearchResult = Search(QueryList, SearchBox.Text, MaxBlurCount:=6, MinBlurSimilarity:=0.35).Select(Function(r) r.Item).ToList
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="游戏内存">
|
||||
<local:MyCard Margin="0,0,0,15" Title="内存分配">
|
||||
<StackPanel Margin="25,40,25,15">
|
||||
<local:MyHint x:Name="LabRamWarn" Text="32 位 Java 只能分配最多 1 GB 的内存。强烈建议换用 64 位的 Java!" Theme="Yellow" Margin="0,0,0,12" />
|
||||
<Grid Margin="0,0,0,3">
|
||||
@@ -204,6 +204,8 @@
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="31" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -213,12 +215,24 @@
|
||||
Height="100" AcceptsReturn="True" TextWrapping="Wrap" VerticalContentAlignment="Top" Padding="0,5" VerticalScrollBarVisibility="Auto" />
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="游戏参数" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="VersionAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。
例如,输入 --demo 则会以试玩模式启动游戏。

支持 Minecraft 版本 JSON 中的字符串替换标记,例如 ${library_directory}。
也支持使用 PCL 的替换标记,在 更多 → 帮助 中搜索 “替换标记” 以了解用法。

若留空,则跟随全局设置的值。" HintText="跟随全局设置" />
|
||||
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="启动前执行命令" Margin="0,0,25,3" />
|
||||
<local:MyTextBox x:Name="TextAdvanceRun" Grid.Row="4" Grid.ColumnSpan="2" Tag="VersionAdvanceRun" Grid.Column="1" HintText="" Margin="0,0,0,3"
|
||||
<TextBlock VerticalAlignment="Center" Grid.Row="4" HorizontalAlignment="Left" Text="内存管理" Margin="0,0,25,0" />
|
||||
<local:MyComboBox x:Name="ComboAdvanceGC" Grid.Row="4" Grid.ColumnSpan="2" Tag="VersionAdvanceGC" Grid.Column="1">
|
||||
<local:MyComboBoxItem Content="跟随全局设置" IsSelected="True" />
|
||||
<local:MyComboBoxItem Content="尽量使用 ZGC(激进)"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="在 Java 21+ 使用分代 ZGC,20~15 使用非分代的 ZGC,14- 使用 G1GC。
在 Java 25+ 额外添加 -XX:+UseCompactObjectHeaders。

覆盖 “Java 虚拟机参数” 设置中的 GC 相关参数。" />
|
||||
<local:MyComboBoxItem Content="尽量使用分代 ZGC(平衡)"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="在 Java 21+ 使用分代 ZGC,20- 使用 G1GC。
在 Java 25+ 额外添加 -XX:+UseCompactObjectHeaders。

覆盖 “Java 虚拟机参数” 设置中的 GC 相关参数。" />
|
||||
<local:MyComboBoxItem Content="仅 G1GC"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="固定使用以下参数:
-XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

覆盖 “Java 虚拟机参数” 设置中的 GC 相关参数。" />
|
||||
<local:MyComboBoxItem Content="不指定(可自定义)"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="不自动添加 GC 参数。

仅当选择此项时,你可以在 “Java 虚拟机参数” 设置中手动添加 GC 参数。" />
|
||||
</local:MyComboBox>
|
||||
<TextBlock Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Text="启动前执行命令" Margin="0,0,25,3" />
|
||||
<local:MyTextBox x:Name="TextAdvanceRun" Grid.Row="6" Grid.ColumnSpan="2" Tag="VersionAdvanceRun" Grid.Column="1" HintText="" Margin="0,0,0,3"
|
||||
ToolTip="该项不会覆盖全局设置:启动时会先执行全局设置的命令,再执行版本设置的命令。

在 MC 启动前执行特定命令或程序,语法与 Windows 的命令提示符一致。

你可以用替换标记来动态改变其内容或实现相对路径,在 更多 → 帮助 中搜索 “替换标记” 以了解用法。例如:
 · "{verpath}test.exe" :运行版本文件夹下的 test.exe 程序
 · "{java}java.exe" -jar "{verpath}test.jar" :用 Java 运行版本文件夹下的 test.jar
 · notepad "{verindie}options.txt" :使用记事本打开该版本的设置文件

涉及路径的操作最好都打上双引号,以避免路径中的空格导致运行失败。
执行命令时,命令行所在的目录是当前的 .minecraft 文件夹。" />
|
||||
<local:MyCheckBox Grid.Row="5" Grid.Column="1" x:Name="CheckAdvanceRunWait" Tag="VersionAdvanceRunWait" Visibility="Collapsed"
|
||||
<local:MyCheckBox Grid.Row="7" Grid.Column="1" x:Name="CheckAdvanceRunWait" Tag="VersionAdvanceRunWait" Visibility="Collapsed"
|
||||
Text="等待命令执行完成后再继续启动" Margin="0,5,0,0" />
|
||||
<StackPanel Margin="0,12,0,4" Grid.Row="6" Grid.ColumnSpan="2" HorizontalAlignment="Left">
|
||||
<StackPanel Margin="0,12,0,4" Grid.Row="8" Grid.ColumnSpan="2" HorizontalAlignment="Left">
|
||||
<local:MyCheckBox Height="28" Text="禁止更新 Mod" x:Name="CheckAdvanceDisableModUpdate" Tag="VersionAdvanceDisableModUpdate"
|
||||
ToolTip="禁止为此版本更新 Mod,以防止整合包玩家误操作"
|
||||
ToolTipService.Placement="Right" />
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
'高级设置
|
||||
TextAdvanceJvm.Text = Setup.Get("VersionAdvanceJvm", Instance:=PageInstanceLeft.Instance)
|
||||
TextAdvanceGame.Text = Setup.Get("VersionAdvanceGame", Instance:=PageInstanceLeft.Instance)
|
||||
ComboAdvanceGC.SelectedIndex = Setup.Get("VersionAdvanceGC", Instance:=PageInstanceLeft.Instance)
|
||||
TextAdvanceRun.Text = Setup.Get("VersionAdvanceRun", Instance:=PageInstanceLeft.Instance)
|
||||
CheckAdvanceRunWait.Checked = Setup.Get("VersionAdvanceRunWait", Instance:=PageInstanceLeft.Instance)
|
||||
If Setup.Get("VersionAdvanceAssets", Instance:=PageInstanceLeft.Instance) = 2 Then
|
||||
@@ -86,6 +87,7 @@
|
||||
Setup.Reset("VersionRamOptimize", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceJvm", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceGame", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceGC", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceAssets", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceAssetsV2", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceJava", Instance:=PageInstanceLeft.Instance)
|
||||
@@ -93,7 +95,6 @@
|
||||
Setup.Reset("VersionAdvanceRunWait", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceDisableJLW", Instance:=PageInstanceLeft.Instance)
|
||||
Setup.Reset("VersionAdvanceDisableModUpdate", Instance:=PageInstanceLeft.Instance)
|
||||
|
||||
Setup.Reset("VersionArgumentJavaSelect", Instance:=PageInstanceLeft.Instance)
|
||||
JavaSearchLoader.Start(IsForceRestart:=True)
|
||||
|
||||
@@ -121,7 +122,7 @@
|
||||
Private Shared Sub SliderChange(sender As MySlider, e As Object) Handles SliderRamCustom.Change
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Value, Instance:=PageInstanceLeft.Instance)
|
||||
End Sub
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboRamOptimize.SelectionChanged
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboRamOptimize.SelectionChanged, ComboAdvanceGC.SelectionChanged
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex, Instance:=PageInstanceLeft.Instance)
|
||||
End Sub
|
||||
Private Shared Sub CheckBoxLikeComboChange(sender As MyComboBox, e As Object) Handles ComboArgumentIndieV2.SelectionChanged
|
||||
|
||||
@@ -88,7 +88,7 @@ Public Class PageLaunchRight
|
||||
Url = "https://pcl-bmcl.milu.ink/"
|
||||
Case 7
|
||||
Log("[Page] 主页预设:主页市场")
|
||||
Url = "https://pclhomeplazaoss.lingyunawa.top:26994/d/Homepages/JingHai-Lingyun/Custom.xaml"
|
||||
Url = "https://pclhomeplazaoss.lingyunawa.top:26994/p/Homepages/Homepage.Market/Custom.xaml"
|
||||
Case 8
|
||||
Log("[Page] 主页预设:更新日志")
|
||||
Url = "https://pclhomeplazaoss.lingyunawa.top:26994/d/Homepages/Joker2184/UpdateHomepage.xaml"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -144,13 +144,13 @@
|
||||
If Not Entry.ShowInSearch OrElse (Val(VersionBranchCode) <> 50 AndAlso Not Entry.ShowInSnapshot) Then Continue For
|
||||
QueryList.Add(New SearchEntry(Of HelpEntry) With {
|
||||
.Item = Entry,
|
||||
.SearchSource = New List(Of KeyValuePair(Of String, Double)) From {
|
||||
New KeyValuePair(Of String, Double)(Entry.Title, 1),
|
||||
New KeyValuePair(Of String, Double)(Entry.Desc, 0.5),
|
||||
New KeyValuePair(Of String, Double)(Entry.Search, 1.5)
|
||||
.SearchSource = New List(Of SearchSource) From {
|
||||
New SearchSource(Entry.Title, 1),
|
||||
New SearchSource(Entry.Desc, 0.5),
|
||||
New SearchSource(Entry.Search, 1.5)
|
||||
}
|
||||
})
|
||||
'New KeyValuePair(Of String, Double)(If(Entry.IsEvent, If(Entry.EventData, ""), Entry.XamlContent), 0.2)
|
||||
'New SearchSource(If(Entry.IsEvent, If(Entry.EventData, ""), Entry.XamlContent), 0.2)
|
||||
Next
|
||||
'进行搜索,构造列表
|
||||
Dim SearchResult = Search(QueryList, SearchBox.Text, MaxBlurCount:=5, MinBlurSimilarity:=0.08)
|
||||
|
||||
@@ -101,12 +101,13 @@
|
||||
{"LaunchArgumentWindowHeight", New SetupEntry(480)},
|
||||
{"LaunchArgumentWindowType", New SetupEntry(1)},
|
||||
{"LaunchArgumentRam", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
{"LaunchAdvanceJvm", New SetupEntry("-XX:+UseG1GC -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -Djdk.lang.Process.allowAmbiguousCommands=true -Dfml.ignoreInvalidMinecraftCertificates=True -Dfml.ignorePatchDiscrepancies=True -Dlog4j2.formatMsgNoLookups=true")},
|
||||
{"LaunchAdvanceJvm", New SetupEntry("-XX:-OmitStackTraceInFastThrow -Djdk.lang.Process.allowAmbiguousCommands=true -Dfml.ignoreInvalidMinecraftCertificates=True -Dfml.ignorePatchDiscrepancies=True -Dlog4j2.formatMsgNoLookups=true")},
|
||||
{"LaunchAdvanceGame", New SetupEntry("")},
|
||||
{"LaunchAdvanceRun", New SetupEntry("")},
|
||||
{"LaunchAdvanceRunWait", New SetupEntry(True)},
|
||||
{"LaunchAdvanceDisableJLW", New SetupEntry(False)},
|
||||
{"LaunchAdvanceGraphicCard", New SetupEntry(True, Source:=SetupSource.Registry)},
|
||||
{"LaunchAdvanceGC", New SetupEntry(1)},
|
||||
{"LaunchRamType", New SetupEntry(0)},
|
||||
{"LaunchRamCustom", New SetupEntry(15)},
|
||||
{"LinkLastAutoJoinInviteCode", New SetupEntry("", Source:=SetupSource.Registry)},
|
||||
@@ -180,6 +181,7 @@
|
||||
{"VersionAdvanceRunWait", New SetupEntry(True, Source:=SetupSource.Instance)},
|
||||
{"VersionAdvanceDisableJLW", New SetupEntry(False, Source:=SetupSource.Instance)},
|
||||
{"VersionAdvanceDisableModUpdate", New SetupEntry(False, Source:=SetupSource.Instance)},
|
||||
{"VersionAdvanceGC", New SetupEntry(0, Source:=SetupSource.Instance)},
|
||||
{"VersionRamType", New SetupEntry(2, Source:=SetupSource.Instance)},
|
||||
{"VersionRamCustom", New SetupEntry(15, Source:=SetupSource.Instance)},
|
||||
{"VersionRamOptimize", New SetupEntry(0, Source:=SetupSource.Instance)},
|
||||
@@ -529,72 +531,57 @@
|
||||
FrmMain.ImgBack.Margin = New Thickness(-(Value + 1) / 1.8)
|
||||
End Sub
|
||||
Public Sub UiBackgroundSuit(Value As Integer)
|
||||
If IsNothing(FrmMain.ImgBack.Background) Then Return
|
||||
Dim Width As Double = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width
|
||||
Dim Height As Double = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height
|
||||
If FrmMain.ImgBack.Background Is Nothing Then Return
|
||||
Dim Brush As ImageBrush = CType(FrmMain.ImgBack.Background, ImageBrush)
|
||||
If Value = 0 Then
|
||||
'智能:当图片较小时平铺,较大时适应
|
||||
If Width < FrmMain.PanMain.ActualWidth / 2 AndAlso Height < FrmMain.PanMain.ActualHeight / 2 Then
|
||||
If Brush.ImageSource.Width < FrmMain.PanMain.ActualWidth / 2 AndAlso Brush.ImageSource.Height < FrmMain.PanMain.ActualHeight / 2 Then
|
||||
Value = 4 '平铺
|
||||
Else
|
||||
Value = 2 '适应
|
||||
End If
|
||||
End If
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).TileMode = TileMode.None
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Viewport = New Rect(0, 0, 1, 1)
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).ViewportUnits = BrushMappingMode.RelativeToBoundingBox
|
||||
Brush.Stretch = Stretch.UniformToFill
|
||||
Brush.TileMode = TileMode.None
|
||||
Brush.Viewport = New Rect(0, 0, 1, 1)
|
||||
Brush.ViewportUnits = BrushMappingMode.RelativeToBoundingBox
|
||||
Select Case Value
|
||||
Case 1 '居中
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Center
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Center
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.None
|
||||
FrmMain.ImgBack.Width = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width
|
||||
FrmMain.ImgBack.Height = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height
|
||||
Case 2 '适应
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Stretch
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Stretch
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.UniformToFill
|
||||
FrmMain.ImgBack.Width = Double.NaN
|
||||
FrmMain.ImgBack.Height = Double.NaN
|
||||
Case 3 '拉伸
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Stretch
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Stretch
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.Fill
|
||||
FrmMain.ImgBack.Width = Double.NaN
|
||||
FrmMain.ImgBack.Height = Double.NaN
|
||||
Brush.Stretch = Stretch.Fill
|
||||
Case 4 '平铺
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Stretch
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Stretch
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.None
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).TileMode = TileMode.Tile
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Viewport = New Rect(0, 0, CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width, CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height)
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).ViewportUnits = BrushMappingMode.Absolute
|
||||
FrmMain.ImgBack.Width = Double.NaN
|
||||
FrmMain.ImgBack.Height = Double.NaN
|
||||
Brush.Stretch = Stretch.None
|
||||
Brush.TileMode = TileMode.Tile
|
||||
Brush.Viewport = New Rect(0, 0, Brush.ImageSource.Width, Brush.ImageSource.Height)
|
||||
Brush.ViewportUnits = BrushMappingMode.Absolute
|
||||
|
||||
Case 1 '中
|
||||
Brush.AlignmentX = AlignmentX.Center
|
||||
Brush.AlignmentY = AlignmentY.Center
|
||||
Case 5 '左上
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Left
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Top
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.None
|
||||
FrmMain.ImgBack.Width = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width
|
||||
FrmMain.ImgBack.Height = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height
|
||||
Brush.AlignmentX = AlignmentX.Left
|
||||
Brush.AlignmentY = AlignmentY.Top
|
||||
Case 6 '右上
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Right
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Top
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.None
|
||||
FrmMain.ImgBack.Width = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width
|
||||
FrmMain.ImgBack.Height = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height
|
||||
Brush.AlignmentX = AlignmentX.Right
|
||||
Brush.AlignmentY = AlignmentY.Top
|
||||
Case 7 '左下
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Left
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Bottom
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.None
|
||||
FrmMain.ImgBack.Width = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width
|
||||
FrmMain.ImgBack.Height = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height
|
||||
Brush.AlignmentX = AlignmentX.Left
|
||||
Brush.AlignmentY = AlignmentY.Bottom
|
||||
Case 8 '右下
|
||||
FrmMain.ImgBack.HorizontalAlignment = HorizontalAlignment.Right
|
||||
FrmMain.ImgBack.VerticalAlignment = VerticalAlignment.Bottom
|
||||
CType(FrmMain.ImgBack.Background, ImageBrush).Stretch = Stretch.None
|
||||
FrmMain.ImgBack.Width = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width
|
||||
FrmMain.ImgBack.Height = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height
|
||||
Brush.AlignmentX = AlignmentX.Right
|
||||
Brush.AlignmentY = AlignmentY.Bottom
|
||||
Case 9 '左
|
||||
Brush.AlignmentX = AlignmentX.Left
|
||||
Brush.AlignmentY = AlignmentY.Center
|
||||
Case 10 '右
|
||||
Brush.AlignmentX = AlignmentX.Right
|
||||
Brush.AlignmentY = AlignmentY.Center
|
||||
Case 11 '上
|
||||
Brush.AlignmentX = AlignmentX.Center
|
||||
Brush.AlignmentY = AlignmentY.Top
|
||||
Case 12 '下
|
||||
Brush.AlignmentX = AlignmentX.Center
|
||||
Brush.AlignmentY = AlignmentY.Bottom
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="游戏内存">
|
||||
<local:MyCard Margin="0,0,0,15" Title="内存分配">
|
||||
<StackPanel Margin="25,40,25,15">
|
||||
<local:MyHint x:Name="LabRamWarn" Visibility="Visible" Text="32 位 Java 只能分配最多 1 GB 的内存。强烈建议换用 64 位的 Java!" Theme="Yellow" Margin="0,0,0,12" />
|
||||
<Grid Margin="0,0,0,3">
|
||||
@@ -231,6 +231,8 @@
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
@@ -249,13 +251,24 @@
|
||||
ToolTip="在 MC 启动前执行特定命令或程序,语法与 Windows 的命令提示符一致。

你可以用替换标记来动态改变其内容或实现相对路径,在 更多 → 帮助 中搜索 “替换标记” 以了解用法。例如:
 · "{verpath}test.exe" :运行版本文件夹下的 test.exe 程序
 · "{java}java.exe" -jar "{verpath}test.jar" :用 Java 运行版本文件夹下的 test.jar
 · notepad "{verindie}options.txt" :使用记事本打开该版本的设置文件

涉及路径的操作最好都打上双引号,以避免路径中的空格导致运行失败。
执行命令时,命令行所在的目录是当前的 .minecraft 文件夹。" />
|
||||
<local:MyCheckBox Grid.Row="5" Grid.Column="1" x:Name="CheckAdvanceRunWait" Tag="LaunchAdvanceRunWait" Visibility="Collapsed"
|
||||
Text="等待命令执行完成后再继续启动" Margin="0,8,0,7" />
|
||||
<StackPanel Margin="0,12,0,4" Grid.Row="6" Grid.ColumnSpan="2" HorizontalAlignment="Left">
|
||||
<TextBlock VerticalAlignment="Center" Grid.Row="7" HorizontalAlignment="Left" Text="内存管理" Margin="0,0,25,0" />
|
||||
<local:MyComboBox x:Name="ComboAdvanceGC" Grid.Row="7" Grid.ColumnSpan="2" Tag="LaunchAdvanceGC" Grid.Column="1">
|
||||
<local:MyComboBoxItem Content="尽量使用 ZGC(激进)"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="在 Java 21+ 使用分代 ZGC,20~15 使用非分代的 ZGC,14- 使用 G1GC。
在 Java 25+ 额外添加 -XX:+UseCompactObjectHeaders。

覆盖 “Java 虚拟机参数” 设置中的 GC 相关参数。" />
|
||||
<local:MyComboBoxItem Content="尽量使用分代 ZGC(平衡)" IsSelected="True"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="在 Java 21+ 使用分代 ZGC,20- 使用 G1GC。
在 Java 25+ 额外添加 -XX:+UseCompactObjectHeaders。

覆盖 “Java 虚拟机参数” 设置中的 GC 相关参数。" />
|
||||
<local:MyComboBoxItem Content="仅 G1GC"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="固定使用以下参数:
-XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

覆盖 “Java 虚拟机参数” 设置中的 GC 相关参数。" />
|
||||
<local:MyComboBoxItem Content="不指定(可自定义)"
|
||||
ToolTipService.BetweenShowDelay="0" ToolTip="不自动添加 GC 参数。

仅当选择此项时,你可以在 “Java 虚拟机参数” 设置中手动添加 GC 参数。" />
|
||||
</local:MyComboBox>
|
||||
<StackPanel Margin="0,12,0,4" Grid.Row="8" Grid.ColumnSpan="2" HorizontalAlignment="Left">
|
||||
<local:MyCheckBox Height="28" Text="禁用 Java Launch Wrapper" x:Name="CheckAdvanceDisableJLW" Tag="LaunchAdvanceDisableJLW"
|
||||
ToolTipService.Placement="Right" ToolTip="PCL 会使用 Java Launch Wrapper 来修复老版本 Java 在中文路径下无法启动的问题。
如果这被反作弊拦截,或遇到其他问题,也可以将其关闭。" />
|
||||
<local:MyCheckBox Height="28" Text="使用高性能显卡" x:Name="CheckAdvanceGraphicCard" Tag="LaunchAdvanceGraphicCard"
|
||||
ToolTipService.Placement="Right" ToolTip="自动在 Windows 设置 → 系统 → 屏幕 → 显示卡 中将 PCL 和 Java 改为使用高性能显卡。
如果同时有集成显卡和独立显卡,这能确保 MC 使用独立显卡进行渲染,以大幅提高帧率。" />
|
||||
</StackPanel>
|
||||
<local:MyHint Text="版本独立设置中还有更多高级选项可供调整。" Margin="0,5,0,10" Theme="Blue" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
<local:MyHint Text="版本独立设置中还有更多高级选项可供调整。" Margin="0,5,0,10" Theme="Blue" Grid.Row="9" Grid.ColumnSpan="2"
|
||||
CanClose="True" RelativeSetup="HintMoreAdvancedSetup" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
TextAdvanceJvm.Text = Setup.Get("LaunchAdvanceJvm")
|
||||
TextAdvanceGame.Text = Setup.Get("LaunchAdvanceGame")
|
||||
TextAdvanceRun.Text = Setup.Get("LaunchAdvanceRun")
|
||||
ComboAdvanceGC.SelectedIndex = Setup.Get("LaunchAdvanceGC")
|
||||
CheckAdvanceRunWait.Checked = Setup.Get("LaunchAdvanceRunWait")
|
||||
CheckAdvanceDisableJLW.Checked = Setup.Get("LaunchAdvanceDisableJLW")
|
||||
CheckAdvanceGraphicCard.Checked = Setup.Get("LaunchAdvanceGraphicCard")
|
||||
@@ -85,6 +86,7 @@
|
||||
Setup.Reset("LaunchAdvanceJvm")
|
||||
Setup.Reset("LaunchAdvanceGame")
|
||||
Setup.Reset("LaunchAdvanceRun")
|
||||
Setup.Reset("LaunchAdvanceGC")
|
||||
Setup.Reset("LaunchAdvanceRunWait")
|
||||
Setup.Reset("LaunchAdvanceDisableJLW")
|
||||
Setup.Reset("LaunchAdvanceGraphicCard")
|
||||
@@ -111,7 +113,7 @@
|
||||
Private Shared Sub SliderChange(sender As MySlider, e As Object) Handles SliderRamCustom.Change
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Value)
|
||||
End Sub
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboArgumentIndieV2.SelectionChanged, ComboArgumentVisibie.SelectionChanged, ComboArgumentWindowType.SelectionChanged, ComboArgumentPriority.SelectionChanged
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboArgumentIndieV2.SelectionChanged, ComboArgumentVisibie.SelectionChanged, ComboArgumentWindowType.SelectionChanged, ComboArgumentPriority.SelectionChanged, ComboAdvanceGC.SelectionChanged
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex)
|
||||
End Sub
|
||||
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckAdvanceRunWait.Change, CheckArgumentRam.Change, CheckAdvanceDisableJLW.Change, CheckAdvanceGraphicCard.Change
|
||||
|
||||
@@ -94,10 +94,14 @@
|
||||
<local:MyComboBoxItem Content="适应" ToolTip="拉伸图片并保持长宽比不变,直至填满整个窗口" />
|
||||
<local:MyComboBoxItem Content="拉伸" ToolTip="拉伸图片使其恰好填满整个窗口,很可能会导致长宽比的改变" />
|
||||
<local:MyComboBoxItem Content="平铺" />
|
||||
<local:MyComboBoxItem Content="居于左上" />
|
||||
<local:MyComboBoxItem Content="居于右上" />
|
||||
<local:MyComboBoxItem Content="居于左下" />
|
||||
<local:MyComboBoxItem Content="居于右下" />
|
||||
<local:MyComboBoxItem Content="左上" />
|
||||
<local:MyComboBoxItem Content="右上" />
|
||||
<local:MyComboBoxItem Content="左下" />
|
||||
<local:MyComboBoxItem Content="右下" />
|
||||
<local:MyComboBoxItem Content="左" />
|
||||
<local:MyComboBoxItem Content="右" />
|
||||
<local:MyComboBoxItem Content="上" />
|
||||
<local:MyComboBoxItem Content="下" />
|
||||
</local:MyComboBox>
|
||||
</Grid>
|
||||
<Grid x:Name="PanBackgroundOpacity" Height="22" Margin="0,0,0,7" Visibility="Collapsed">
|
||||
|
||||
Reference in New Issue
Block a user