From 320b9f22b98e3f15827cdb1ef2fdbfb16e1e4713 Mon Sep 17 00:00:00 2001 From: IotaBread Date: Sun, 7 Jan 2024 19:39:38 -0300 Subject: [PATCH] Add an explanation for the protocol version --- .../src/main/java/org/quiltmc/enigma/network/EnigmaServer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaServer.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaServer.java index a67993344..922ba79dd 100644 --- a/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaServer.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaServer.java @@ -32,6 +32,8 @@ public abstract class EnigmaServer { public static final int DEFAULT_PORT = 34712; + // Testing protocol versions are in hex: 0xMmVV => Major (4 bits), minor (4 bits), sub-Version (8 bits) + // Components are independent of the enigma version, i.e. enigma 2.1.0 isn't protocol 0x2100 public static final int PROTOCOL_VERSION = 0x1001; public static final int CHECKSUM_SIZE = 20; public static final int MAX_PASSWORD_LENGTH = 255; // length is written as a byte in the login packet