mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-02-02 13:01:33 +01:00
Rework 1.13 release protocol support
This commit is contained in:
parent
c8d3e9b897
commit
49ea630d46
77
BungeeCord-Patches/0048-1.13-protocol-support.patch
Normal file
77
BungeeCord-Patches/0048-1.13-protocol-support.patch
Normal file
@ -0,0 +1,77 @@
|
||||
From 1c6a8a78d2269b815bfc4b54cacea7f3f2054be8 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
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<String> SUPPORTED_VERSIONS = Arrays.asList(
|
||||
"1.8.x",
|
||||
"1.9.x",
|
||||
--
|
||||
2.18.0
|
||||
|
@ -1,119 +0,0 @@
|
||||
From 9c4b07c269270bdfcecdc2e42383d1814731ea03 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
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<String> 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
|
||||
|
Loading…
Reference in New Issue
Block a user