From c198370c73c336a5b253d2eb28e93330f09b3dc0 Mon Sep 17 00:00:00 2001 From: Nukepayload2 <1939357182@qq.com> Date: Tue, 20 Feb 2018 23:29:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20VB=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++-- README_CN.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 99 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 07a3dab..f994a41 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ We plan to delay some parameter settings, (such as versionLocator) and make more ## How to initialize a LauncherCore +__C#__ ```csharp LauncherCore core = LauncherCore.Create( @@ -63,8 +64,19 @@ LauncherCore core = LauncherCore.Create( ``` +__VB__ +```vb +Dim core = LauncherCore.Create( + New LauncherCoreCreationOption( + javaPath:=Config.Instance.JavaPath, ' by default it will be the first version finded + gameRootPath:=Nothing, ' by defualt it will be ./.minecraft/ + versionLocator:=theVersionLocator ' by default it will be New JVersionLocator() + )) +``` + ## How to find Versions +__C#__ ```csharp var versions = core.GetVersions(); @@ -73,15 +85,24 @@ var version = core.GetVersion("1.8"); ``` +__VB__ +```vb + +Dim versions = core.GetVersions + +Dim version = core.GetVersion("1.8") + +``` + *unlaunchable Version will be ignored* ## How to launch Minecraft - +__C#__ ```csharp var result = core.Launch(new LaunchOptions { - Version = App.LauncherCore.GetVersion(server.VersionId) + Version = App.LauncherCore.GetVersion(server.VersionId), Authenticator = new OfflineAuthenticator("Steve"), // offline //Authenticator = new YggdrasilLogin("*@*.*", "***", true), // online MaxMemory = Config.Instance.MaxMemory, // optional @@ -92,8 +113,24 @@ var result = core.Launch(new LaunchOptions }, (Action) (x => { })); // optional ( modify arguments before launching ``` +__VB__ +```vb +Dim result = core.Launch(New LaunchOptions With +{ + .Version = App.LauncherCore.GetVersion(server.VersionId), + .Authenticator = New OfflineAuthenticator("Steve"), ' offline. New YggdrasilLogin("*@*.*", "***", True), for online scenario. + .MaxMemory = Config.Instance.MaxMemory, ' optional + .MinMemory = Config.Instance.MaxMemory, ' optional + .Mode = LaunchMode.MCLauncher, ' optional + .Server = New ServerInfo With {.Address = "mc.hypixel.net"}, 'optional + .Size = New WindowSize With {.Height = 768, .Width = 1280} 'optional +}, Sub(x As MinecraftLaunchArguments) + End Sub) ' optional ( modify arguments before launching +``` + ## Using anonymous report ## +__C#__ ```csharp Reporter.SetClientName("Your launcher's name"); // set name Reporter.SetReportLevel(ReportLevel.Full); // full report @@ -102,4 +139,13 @@ Reporter.SetReportLevel(ReportLevel.Full); // full report //Reporter.SetReportLevel(ReportLevel.None); // turn off ``` +__VB__ +```vb +Reporter.SetClientName("Your launcher's name") ' set name +Reporter.SetReportLevel(ReportLevel.Full) ' full report +'Reporter.SetReportLevel(ReportLevel.Basic) ' basic report +'Reporter.SetReportLevel(ReportLevel.Min) ' simplified report +'Reporter.SetReportLevel(ReportLevel.None) ' turn off +``` + # Enjoy! diff --git a/README_CN.md b/README_CN.md index 3471377..7b25c23 100644 --- a/README_CN.md +++ b/README_CN.md @@ -50,19 +50,31 @@ KMCCC.Basic与KMCCC.Pro共享的代码 ## 如何初始化 LauncherCore +__C#__ ```csharp LauncherCore core = LauncherCore.Create( new LauncherCoreCreationOption( - javaPath: Config.Instance.JavaPath, // 默认为找到的第一个版本 - gameRootPath: null, // 默认为 ./.minecraft/ - versionLocator: the Version Locator // 默认情况下将会 new JVersionLocator() + javaPath: Config.Instance.JavaPath, // by default it will be the first version finded + gameRootPath: null, // by defualt it will be ./.minecraft/ + versionLocator: the Version Locator // by default it will be new JVersionLocator() )); ``` +__VB__ +```vb +Dim core = LauncherCore.Create( + New LauncherCoreCreationOption( + javaPath:=Config.Instance.JavaPath, ' by default it will be the first version finded + gameRootPath:=Nothing, ' by defualt it will be ./.minecraft/ + versionLocator:=theVersionLocator ' by default it will be New JVersionLocator() + )) +``` + ## 如何找到 Versions(指定游戏版本) +__C#__ ```csharp var versions = core.GetVersions(); @@ -71,11 +83,20 @@ var version = core.GetVersion("1.8"); ``` +__VB__ +```vb + +Dim versions = core.GetVersions + +Dim version = core.GetVersion("1.8") + +``` + *无效的版本将会被忽略* ## 如何启动 Minecraft - +__C#__ ```csharp var result = core.Launch(new LaunchOptions { @@ -90,14 +111,39 @@ var result = core.Launch(new LaunchOptions }, (Action) (x => { })); // 可选 ( 启动前修改参数 ``` +__VB__ +```vb +Dim result = core.Launch(New LaunchOptions With +{ + .Version = App.LauncherCore.GetVersion(server.VersionId), + .Authenticator = New OfflineAuthenticator("Steve"), ' 离线模式启动。在线模式用 New YggdrasilLogin("*@*.*", "***", True), 。 + .MaxMemory = Config.Instance.MaxMemory, ' 可选 + .MinMemory = Config.Instance.MaxMemory, ' 可选 + .Mode = LaunchMode.MCLauncher, ' 可选 + .Server = New ServerInfo With {.Address = "mc.hypixel.net"}, '可选 + .Size = New WindowSize With {.Height = 768, .Width = 1280} '可选 +}, Sub(x As MinecraftLaunchArguments) + End Sub) ' 可选 ( 启动前修改参数 +``` + ## 使用匿名报告 ## +__C#__ ```csharp -Reporter.SetClientName("你的启动器名字"); // 设置启动器名字 +Reporter.SetClientName("Your launcher's name"); // 设置启动器名字 Reporter.SetReportLevel(ReportLevel.Full); // 报告所有信息 //Reporter.SetReportLevel(ReportLevel.Basic); // 报告基本信息 //Reporter.SetReportLevel(ReportLevel.Min); // 报告非常少的信息 //Reporter.SetReportLevel(ReportLevel.None); // 关掉 ``` +__VB__ +```vb +Reporter.SetClientName("Your launcher's name") ' 设置启动器名字 +Reporter.SetReportLevel(ReportLevel.Full) ' 报告所有信息 +'Reporter.SetReportLevel(ReportLevel.Basic) ' 报告基本信息 +'Reporter.SetReportLevel(ReportLevel.Min) ' 报告非常少的信息 +'Reporter.SetReportLevel(ReportLevel.None) ' 关掉 +``` + # Enjoy! From edb7293527f96e42f62298523ca8e2087c5f8062 Mon Sep 17 00:00:00 2001 From: Nukepayload2 <1939357182@qq.com> Date: Tue, 20 Feb 2018 23:33:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A1=A5=E5=85=A8=E6=B1=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_CN.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README_CN.md b/README_CN.md index 7b25c23..637532f 100644 --- a/README_CN.md +++ b/README_CN.md @@ -55,9 +55,9 @@ __C#__ LauncherCore core = LauncherCore.Create( new LauncherCoreCreationOption( - javaPath: Config.Instance.JavaPath, // by default it will be the first version finded - gameRootPath: null, // by defualt it will be ./.minecraft/ - versionLocator: the Version Locator // by default it will be new JVersionLocator() + javaPath: Config.Instance.JavaPath, // 默认为找到的第一个版本 + gameRootPath: null, // 默认为 ./.minecraft/ + versionLocator: the Version Locator // 默认情况下将会 new JVersionLocator() )); ``` @@ -66,9 +66,9 @@ __VB__ ```vb Dim core = LauncherCore.Create( New LauncherCoreCreationOption( - javaPath:=Config.Instance.JavaPath, ' by default it will be the first version finded - gameRootPath:=Nothing, ' by defualt it will be ./.minecraft/ - versionLocator:=theVersionLocator ' by default it will be New JVersionLocator() + javaPath:=Config.Instance.JavaPath, ' 默认为找到的第一个版本 + gameRootPath:=Nothing, ' 默认为 ./.minecraft/ + versionLocator:=theVersionLocator ' 默认情况下将会 New JVersionLocator() )) ``` From d36c9e8f0b3a5ce0e29a27866c0fd2f0c067ea24 Mon Sep 17 00:00:00 2001 From: Nukepayload2 <1939357182@qq.com> Date: Tue, 20 Feb 2018 23:34:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=A5=E5=85=A8=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E6=B1=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_CN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_CN.md b/README_CN.md index 637532f..1e03cd2 100644 --- a/README_CN.md +++ b/README_CN.md @@ -130,7 +130,7 @@ Dim result = core.Launch(New LaunchOptions With __C#__ ```csharp -Reporter.SetClientName("Your launcher's name"); // 设置启动器名字 +Reporter.SetClientName("你的启动器名字"); // 设置启动器名字 Reporter.SetReportLevel(ReportLevel.Full); // 报告所有信息 //Reporter.SetReportLevel(ReportLevel.Basic); // 报告基本信息 //Reporter.SetReportLevel(ReportLevel.Min); // 报告非常少的信息 @@ -139,7 +139,7 @@ Reporter.SetReportLevel(ReportLevel.Full); // 报告所有信息 __VB__ ```vb -Reporter.SetClientName("Your launcher's name") ' 设置启动器名字 +Reporter.SetClientName("你的启动器名字") ' 设置启动器名字 Reporter.SetReportLevel(ReportLevel.Full) ' 报告所有信息 'Reporter.SetReportLevel(ReportLevel.Basic) ' 报告基本信息 'Reporter.SetReportLevel(ReportLevel.Min) ' 报告非常少的信息