mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix dev build numbering, add update notes
Add newline in AssemblyInfo to fix dev build number in exe (#456) Add remarks on how to implement newer MC versions (from #145, #599)
This commit is contained in:
parent
9841156130
commit
5f83ff0958
6 changed files with 29 additions and 5 deletions
|
|
@ -4,7 +4,13 @@
|
|||
/// Represents Minecraft Materials
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Generated from blocks.json using PaletteGenerator.cs
|
||||
/// Generated from blocks.json using PaletteGenerator.cs.
|
||||
/// Typical steps to handle new blocks for newer Minecraft versions:
|
||||
/// 1. Generate blocks.json using data reporting on Vanilla Minecraft (https://wiki.vg/Data_Generators)
|
||||
/// 2. Generate temporary MaterialXXX.cs and PaletteXXX.cs using PaletteGenerator.cs
|
||||
/// 3. Perform a diff with existing versions, add missing entries in Material.cs and MaterialExtensions.cs
|
||||
/// 4. If existing state IDs were not randomized by Mojang, simply add missing state entries to Palette113.cs
|
||||
/// 5. If existing state IDs were randomized, add a new palette as PaletteXXX.cs into the codebase (worst case)
|
||||
/// </remarks>
|
||||
public enum Material
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ namespace MinecraftClient
|
|||
/// <summary>
|
||||
/// The main client class, used to connect to a Minecraft server.
|
||||
/// </summary>
|
||||
|
||||
public class McTcpClient : IMinecraftComHandler
|
||||
{
|
||||
public static int ReconnectionAttemptsLeft = 0;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,13 @@ namespace MinecraftClient
|
|||
/// Allows to connect to any Minecraft server, send and receive text, automated scripts.
|
||||
/// This source code is released under the CDDL 1.0 License.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Typical steps to update MCC for a new Minecraft version
|
||||
/// - Implement protocol changes (see Protocol18.cs)
|
||||
/// - Handle new block types and states (see Material.cs)
|
||||
/// - Mark new version as handled (see ProtocolHandler.cs)
|
||||
/// - Update MCHighestVersion field below (for versionning)
|
||||
/// </remarks>
|
||||
static class Program
|
||||
{
|
||||
private static McTcpClient Client;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||
//[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("https://github.com/ORelio/Minecraft-Console-Client")]
|
||||
[assembly: AssemblyProduct("MinecraftClient")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012-2018 ORelio & Contributors")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012-2019 ORelio & Contributors")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
|
@ -39,4 +39,4 @@ using System.Runtime.InteropServices;
|
|||
// MCC will use the following command as CMD pre-build script in AppVeyor msbuild settings:
|
||||
// echo [assembly: AssemblyConfiguration("AppVeyor build %APPVEYOR_BUILD_NUMBER%, built on %DATE% from commit %APPVEYOR_REPO_COMMIT:~0,7%")] >> MinecraftClient\Properties\AssemblyInfo.cs
|
||||
// The command will add build info like the example below to be incorporated in Assembly Info in order to display build info on launch
|
||||
// [assembly: AssemblyConfiguration("AppVeyor build 1234, built on Sun 31/12/2017 from commit abc1def")]
|
||||
// [assembly: AssemblyConfiguration("AppVeyor build 1234, built on Sun 31/12/2017 from commit abc1def")]
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
/// <summary>
|
||||
/// Implementation for Minecraft 1.7.X+ Protocols
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Typical update steps for implementing protocol changes for a new Minecraft version:
|
||||
/// - Perform a diff between latest supported version in MCC and new stable version to support on https://wiki.vg/Protocol
|
||||
/// - If there are any changes in packets implemented by MCC, add MCXXXVersion field below and implement new packet layouts
|
||||
/// - If packet IDs were changed, also update getPacketIncomingType() and getPacketOutgoingID()
|
||||
/// </remarks>
|
||||
class Protocol18Handler : IMinecraftCom
|
||||
{
|
||||
private const int MC18Version = 47;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ namespace MinecraftClient.Protocol
|
|||
/// <summary>
|
||||
/// Handle login, session, server ping and provide a protocol handler for interacting with a minecraft server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Typical update steps for marking a new Minecraft version as supported:
|
||||
/// - Add protocol ID in GetProtocolHandler()
|
||||
/// - Add 1.X.X case in MCVer2ProtocolVersion()
|
||||
/// </remarks>
|
||||
public static class ProtocolHandler
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -106,7 +111,7 @@ namespace MinecraftClient.Protocol
|
|||
int[] supportedVersions_Protocol16 = { 51, 60, 61, 72, 73, 74, 78 };
|
||||
if (Array.IndexOf(supportedVersions_Protocol16, ProtocolVersion) > -1)
|
||||
return new Protocol16Handler(Client, ProtocolVersion, Handler);
|
||||
int[] supportedVersions_Protocol18 = { 4, 5, 47, 107, 108, 109, 110, 210, 315, 316, 335, 338, 340, 393, 401 , 404 };
|
||||
int[] supportedVersions_Protocol18 = { 4, 5, 47, 107, 108, 109, 110, 210, 315, 316, 335, 338, 340, 393, 401, 404 };
|
||||
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
|
||||
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
|
||||
throw new NotSupportedException("The protocol version no." + ProtocolVersion + " is not supported.");
|
||||
|
|
@ -526,6 +531,7 @@ namespace MinecraftClient.Protocol
|
|||
private static string JsonEncode(string text)
|
||||
{
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
foreach (char c in text)
|
||||
{
|
||||
if ((c >= '0' && c <= '9') ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue