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
|
/// Represents Minecraft Materials
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <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>
|
/// </remarks>
|
||||||
public enum Material
|
public enum Material
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ namespace MinecraftClient
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The main client class, used to connect to a Minecraft server.
|
/// The main client class, used to connect to a Minecraft server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class McTcpClient : IMinecraftComHandler
|
public class McTcpClient : IMinecraftComHandler
|
||||||
{
|
{
|
||||||
public static int ReconnectionAttemptsLeft = 0;
|
public static int ReconnectionAttemptsLeft = 0;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,13 @@ namespace MinecraftClient
|
||||||
/// Allows to connect to any Minecraft server, send and receive text, automated scripts.
|
/// Allows to connect to any Minecraft server, send and receive text, automated scripts.
|
||||||
/// This source code is released under the CDDL 1.0 License.
|
/// This source code is released under the CDDL 1.0 License.
|
||||||
/// </summary>
|
/// </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
|
static class Program
|
||||||
{
|
{
|
||||||
private static McTcpClient Client;
|
private static McTcpClient Client;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||||
//[assembly: AssemblyConfiguration("")]
|
//[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("https://github.com/ORelio/Minecraft-Console-Client")]
|
[assembly: AssemblyCompany("https://github.com/ORelio/Minecraft-Console-Client")]
|
||||||
[assembly: AssemblyProduct("MinecraftClient")]
|
[assembly: AssemblyProduct("MinecraftClient")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012-2018 ORelio & Contributors")]
|
[assembly: AssemblyCopyright("Copyright © 2012-2019 ORelio & Contributors")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,12 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implementation for Minecraft 1.7.X+ Protocols
|
/// Implementation for Minecraft 1.7.X+ Protocols
|
||||||
/// </summary>
|
/// </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
|
class Protocol18Handler : IMinecraftCom
|
||||||
{
|
{
|
||||||
private const int MC18Version = 47;
|
private const int MC18Version = 47;
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@ namespace MinecraftClient.Protocol
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handle login, session, server ping and provide a protocol handler for interacting with a minecraft server.
|
/// Handle login, session, server ping and provide a protocol handler for interacting with a minecraft server.
|
||||||
/// </summary>
|
/// </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
|
public static class ProtocolHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -106,7 +111,7 @@ namespace MinecraftClient.Protocol
|
||||||
int[] supportedVersions_Protocol16 = { 51, 60, 61, 72, 73, 74, 78 };
|
int[] supportedVersions_Protocol16 = { 51, 60, 61, 72, 73, 74, 78 };
|
||||||
if (Array.IndexOf(supportedVersions_Protocol16, ProtocolVersion) > -1)
|
if (Array.IndexOf(supportedVersions_Protocol16, ProtocolVersion) > -1)
|
||||||
return new Protocol16Handler(Client, ProtocolVersion, Handler);
|
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)
|
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
|
||||||
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
|
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
|
||||||
throw new NotSupportedException("The protocol version no." + ProtocolVersion + " is not supported.");
|
throw new NotSupportedException("The protocol version no." + ProtocolVersion + " is not supported.");
|
||||||
|
|
@ -526,6 +531,7 @@ namespace MinecraftClient.Protocol
|
||||||
private static string JsonEncode(string text)
|
private static string JsonEncode(string text)
|
||||||
{
|
{
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
|
|
||||||
foreach (char c in text)
|
foreach (char c in text)
|
||||||
{
|
{
|
||||||
if ((c >= '0' && c <= '9') ||
|
if ((c >= '0' && c <= '9') ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue