mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-02-26 16:51:21 +01:00
120 lines
5.8 KiB
Diff
120 lines
5.8 KiB
Diff
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
|
|
|