From 49ea630d4611ea314e2d178a9b60d8c872045993 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 21 Jul 2018 15:12:17 +0100 Subject: [PATCH] Rework 1.13 release protocol support --- .../0048-1.13-protocol-support.patch | 77 ++++++++++++ .../0048-Add-temp-1.13-release-support.patch | 119 ------------------ 2 files changed, 77 insertions(+), 119 deletions(-) create mode 100644 BungeeCord-Patches/0048-1.13-protocol-support.patch delete mode 100644 BungeeCord-Patches/0048-Add-temp-1.13-release-support.patch diff --git a/BungeeCord-Patches/0048-1.13-protocol-support.patch b/BungeeCord-Patches/0048-1.13-protocol-support.patch new file mode 100644 index 0000000..17f7a20 --- /dev/null +++ b/BungeeCord-Patches/0048-1.13-protocol-support.patch @@ -0,0 +1,77 @@ +From 1c6a8a78d2269b815bfc4b54cacea7f3f2054be8 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Sat, 21 Jul 2018 17:14:39 +0100 +Subject: [PATCH] 1.13 protocol support + + +diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +index a8ac332a..a248c7db 100644 +--- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java ++++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +@@ -267,42 +267,36 @@ public enum Protocol + { + TO_CLIENT.registerPacket( + LoginPayloadRequest.class, +- map( ProtocolConstants.MINECRAFT_1_13, 0x00 ) ++ map( ProtocolConstants.MINECRAFT_1_13, 0x04 ) + ); + TO_CLIENT.registerPacket( + Kick.class, +- map( ProtocolConstants.MINECRAFT_1_8, 0x00 ), +- map( ProtocolConstants.MINECRAFT_1_13, 0x01 ) ++ map( ProtocolConstants.MINECRAFT_1_8, 0x00 ) + ); + TO_CLIENT.registerPacket( + EncryptionRequest.class, +- map( ProtocolConstants.MINECRAFT_1_8, 0x01 ), +- map( ProtocolConstants.MINECRAFT_1_13, 0x02 ) ++ map( ProtocolConstants.MINECRAFT_1_8, 0x01 ) + ); + TO_CLIENT.registerPacket( + LoginSuccess.class, +- map( ProtocolConstants.MINECRAFT_1_8, 0x02 ), +- map( ProtocolConstants.MINECRAFT_1_13, 0x03 ) ++ map( ProtocolConstants.MINECRAFT_1_8, 0x02 ) + ); + TO_CLIENT.registerPacket( + SetCompression.class, +- map( ProtocolConstants.MINECRAFT_1_8, 0x03 ), +- map( ProtocolConstants.MINECRAFT_1_13, 0x04 ) ++ map( ProtocolConstants.MINECRAFT_1_8, 0x03 ) + ); + + TO_SERVER.registerPacket( + LoginPayloadResponse.class, +- map( ProtocolConstants.MINECRAFT_1_13, 0x00 ) ++ map( ProtocolConstants.MINECRAFT_1_13, 0x02 ) + ); + TO_SERVER.registerPacket( + LoginRequest.class, +- map( ProtocolConstants.MINECRAFT_1_8, 0x00 ), +- map( ProtocolConstants.MINECRAFT_1_13, 0x01 ) ++ map( ProtocolConstants.MINECRAFT_1_8, 0x00 ) + ); + TO_SERVER.registerPacket( + EncryptionResponse.class, +- map( ProtocolConstants.MINECRAFT_1_8, 0x01 ), +- map( ProtocolConstants.MINECRAFT_1_13, 0x02 ) ++ map( ProtocolConstants.MINECRAFT_1_8, 0x01 ) + ); + } + }; +diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java +index bba6cb2d..b2dc9423 100644 +--- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java ++++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java +@@ -17,7 +17,7 @@ public class ProtocolConstants + public static final int MINECRAFT_1_12 = 335; + public static final int MINECRAFT_1_12_1 = 338; + public static final int MINECRAFT_1_12_2 = 340; +- public static final int MINECRAFT_1_13 = 389; ++ public static final int MINECRAFT_1_13 = 393; + public static final List SUPPORTED_VERSIONS = Arrays.asList( + "1.8.x", + "1.9.x", +-- +2.18.0 + diff --git a/BungeeCord-Patches/0048-Add-temp-1.13-release-support.patch b/BungeeCord-Patches/0048-Add-temp-1.13-release-support.patch deleted file mode 100644 index d29cb3d..0000000 --- a/BungeeCord-Patches/0048-Add-temp-1.13-release-support.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 9c4b07c269270bdfcecdc2e42383d1814731ea03 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Fri, 20 Jul 2018 03:54:51 +0100 -Subject: [PATCH] Add temp 1.13 release support - -To be dropped when upstream releases final support for 1.13 - -diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -index a8ac332a..c08398b1 100644 ---- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -+++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -@@ -267,42 +267,50 @@ public enum Protocol - { - TO_CLIENT.registerPacket( - LoginPayloadRequest.class, -- map( ProtocolConstants.MINECRAFT_1_13, 0x00 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x00 ), -+ map( ProtocolConstants.MINECRAFT_1_13_R, 0x03 ) // Waterfall - 1.13 - ); - TO_CLIENT.registerPacket( - Kick.class, - map( ProtocolConstants.MINECRAFT_1_8, 0x00 ), -- map( ProtocolConstants.MINECRAFT_1_13, 0x01 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x01 ), -+ map( ProtocolConstants.MINECRAFT_1_13_R, 0x00 ) // Waterfall - 1.13 - ); - TO_CLIENT.registerPacket( - EncryptionRequest.class, - map( ProtocolConstants.MINECRAFT_1_8, 0x01 ), -- map( ProtocolConstants.MINECRAFT_1_13, 0x02 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x02 ), -+ map( ProtocolConstants.MINECRAFT_1_13_R, 0x01 ) // Waterfall - 1.13 - ); - TO_CLIENT.registerPacket( - LoginSuccess.class, - map( ProtocolConstants.MINECRAFT_1_8, 0x02 ), -- map( ProtocolConstants.MINECRAFT_1_13, 0x03 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x03 ), -+ map( ProtocolConstants.MINECRAFT_1_13_R, 0x02 ) // Waterfall - 1.13 - ); - TO_CLIENT.registerPacket( - SetCompression.class, - map( ProtocolConstants.MINECRAFT_1_8, 0x03 ), -- map( ProtocolConstants.MINECRAFT_1_13, 0x04 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x04 ), -+ map( ProtocolConstants.MINECRAFT_1_13_R, 0x03 ) // Waterfall - 1.13 - ); - - TO_SERVER.registerPacket( - LoginPayloadResponse.class, -- map( ProtocolConstants.MINECRAFT_1_13, 0x00 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x00 ), -+ map( ProtocolConstants.MINECRAFT_1_13, 0x02 ) // Waterfall - 1.13 - ); - TO_SERVER.registerPacket( - LoginRequest.class, - map( ProtocolConstants.MINECRAFT_1_8, 0x00 ), -- map( ProtocolConstants.MINECRAFT_1_13, 0x01 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x01 ), -+ map( ProtocolConstants.MINECRAFT_1_13_R, 0x00 ) // Waterfall - 1.13 - ); - TO_SERVER.registerPacket( - EncryptionResponse.class, - map( ProtocolConstants.MINECRAFT_1_8, 0x01 ), -- map( ProtocolConstants.MINECRAFT_1_13, 0x02 ) -+ map( ProtocolConstants.MINECRAFT_1_13, 0x02 ), -+ map( ProtocolConstants.MINECRAFT_1_13_R, 0x01 ) // Waterfall - 1.13 - ); - } - }; -@@ -404,6 +412,11 @@ public enum Protocol - linkedProtocols.put( ProtocolConstants.MINECRAFT_1_12_1, Arrays.asList( - ProtocolConstants.MINECRAFT_1_12_2 - ) ); -+ // Waterfall start - 1.13 -+ linkedProtocols.put (ProtocolConstants.MINECRAFT_1_13, Arrays.asList( -+ ProtocolConstants.MINECRAFT_1_13_R -+ )); -+ // Waterfall end - 1.13 - } - - @Getter -diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java -index bba6cb2d..c59e11cf 100644 ---- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java -+++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java -@@ -18,6 +18,7 @@ public class ProtocolConstants - public static final int MINECRAFT_1_12_1 = 338; - public static final int MINECRAFT_1_12_2 = 340; - public static final int MINECRAFT_1_13 = 389; -+ public static final int MINECRAFT_1_13_R = 393; - public static final List SUPPORTED_VERSIONS = Arrays.asList( - "1.8.x", - "1.9.x", -@@ -37,7 +38,8 @@ public class ProtocolConstants - ProtocolConstants.MINECRAFT_1_12, - ProtocolConstants.MINECRAFT_1_12_1, - ProtocolConstants.MINECRAFT_1_12_2, -- ProtocolConstants.MINECRAFT_1_13 -+ ProtocolConstants.MINECRAFT_1_13, -+ ProtocolConstants.MINECRAFT_1_13_R - ); - - public enum Direction -diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java -index bad9773b..66a9d336 100644 ---- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java -+++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java -@@ -48,6 +48,7 @@ public abstract class EntityMap - case ProtocolConstants.MINECRAFT_1_12_2: - return EntityMap_1_12_1.INSTANCE; - case ProtocolConstants.MINECRAFT_1_13: -+ case ProtocolConstants.MINECRAFT_1_13_R: // Waterfall - 1.13 - return EntityMap_1_13.INSTANCE; - } - throw new RuntimeException( "Version " + version + " has no entity map" ); --- -2.18.0 -