mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-01-23 16:11:35 +01:00
1.16.2 Update (#561)
This commit is contained in:
parent
74e388df78
commit
7b4d6e99a9
@ -1 +1 @@
|
||||
Subproject commit 15b514130eb861cb44ddc787aa152f73e259dbb1
|
||||
Subproject commit aa22fe68e5fb3ed26e19022d0419e269c95afcfe
|
@ -1,15 +1,15 @@
|
||||
From e99a057219d07d3c790e9b2664baff972400473a Mon Sep 17 00:00:00 2001
|
||||
From b6077cf1f2ceecea52865c8fb340e2e56cbba387 Mon Sep 17 00:00:00 2001
|
||||
From: Troy Frew <fuzzy_bot@arenaga.me>
|
||||
Date: Tue, 15 Nov 2016 09:07:51 -0500
|
||||
Subject: [PATCH] Fixup ProtocolConstants
|
||||
|
||||
|
||||
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 7298b86c..a82f2ec8 100644
|
||||
index 4ffc35e4..aa1b770c 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
|
||||
@@ -68,6 +68,16 @@ public class ProtocolConstants
|
||||
ProtocolConstants.MINECRAFT_1_16_1
|
||||
@@ -70,6 +70,16 @@ public class ProtocolConstants
|
||||
ProtocolConstants.MINECRAFT_1_16_2
|
||||
);
|
||||
|
||||
+ public static final boolean isBeforeOrEq(int before, int other)
|
||||
@ -26,5 +26,5 @@ index 7298b86c..a82f2ec8 100644
|
||||
{
|
||||
|
||||
--
|
||||
2.20.1.windows.1
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7de6fe2946484fe52af888c1b778ebca99c00d9d Mon Sep 17 00:00:00 2001
|
||||
From 9d02ba002fd6cce2b8888b68ea1693c944f199c3 Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@techcable.net>
|
||||
Date: Tue, 3 May 2016 20:31:52 -0700
|
||||
Subject: [PATCH] Don't access a ByteBuf's underlying array
|
||||
@ -43,7 +43,7 @@ index c01cf317..17e12655 100644
|
||||
* Allow this packet to be sent as an "extended" packet.
|
||||
*/
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
index b4dd2049..6ba7e3f7 100644
|
||||
index 15b2ba0d..ec8a6018 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
@@ -237,7 +237,7 @@ public class ServerConnector extends PacketHandler
|
||||
@ -56,10 +56,10 @@ index b4dd2049..6ba7e3f7 100644
|
||||
}
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index 95922b34..200166d1 100644
|
||||
index a575b634..653242f0 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -263,7 +263,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -268,7 +268,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
|
||||
brand = ByteBufAllocator.DEFAULT.heapBuffer();
|
||||
DefinedPacket.writeString( bungee.getName() + " (" + bungee.getVersion() + ")" + " <- " + serverBrand, brand );
|
||||
@ -86,5 +86,5 @@ index afc2c12a..c0f7980b 100644
|
||||
{
|
||||
@Override
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From bfd2fff8357922fce281d103a2db48a82e59c659 Mon Sep 17 00:00:00 2001
|
||||
From 17dc40e613083bdbc436c7d7f075e09690fa1c58 Mon Sep 17 00:00:00 2001
|
||||
From: Tux <write@imaginarycode.com>
|
||||
Date: Tue, 19 Jan 2016 15:13:29 -0700
|
||||
Subject: [PATCH] Micro-optimizations
|
||||
@ -23,10 +23,10 @@ index bcb229c3..b9d624f8 100644
|
||||
{
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index 200166d1..1ee9510b 100644
|
||||
index 653242f0..d1e57953 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -245,7 +245,6 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -250,7 +250,6 @@ public class DownstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public void handle(PluginMessage pluginMessage) throws Exception
|
||||
{
|
||||
@ -34,7 +34,7 @@ index 200166d1..1ee9510b 100644
|
||||
PluginMessageEvent event = new PluginMessageEvent( server, con, pluginMessage.getTag(), pluginMessage.getData().clone() );
|
||||
|
||||
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
||||
@@ -272,6 +271,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -277,6 +276,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
|
||||
if ( pluginMessage.getTag().equals( "BungeeCord" ) )
|
||||
{
|
||||
@ -43,5 +43,5 @@ index 200166d1..1ee9510b 100644
|
||||
String subChannel = in.readUTF();
|
||||
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a8b84c461be62c15ce5fd104cb2938318388e5e9 Mon Sep 17 00:00:00 2001
|
||||
From 4084e0b7a58fd1d1526486140e81746e9b97c2ef Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@techcable.net>
|
||||
Date: Thu, 19 May 2016 17:09:22 -0600
|
||||
Subject: [PATCH] Allow invalid packet ids for forge servers
|
||||
@ -37,10 +37,10 @@ index d36b7f3c..5e03e175 100644
|
||||
{
|
||||
packet.read( in, prot.getDirection(), protocolVersion );
|
||||
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 3e1776f7..fa34de48 100644
|
||||
index caf4a685..50a911c2 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
|
||||
@@ -431,14 +431,23 @@ public enum Protocol
|
||||
@@ -441,14 +441,23 @@ public enum Protocol
|
||||
return protocol;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ index 3e1776f7..fa34de48 100644
|
||||
throw new BadPacketException( "Packet with id " + id + " outside of range " );
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
index 1bf5e34c..7ef80bf5 100644
|
||||
index 3a24c100..eb8ae99a 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
@@ -32,7 +32,9 @@ import net.md_5.bungee.forge.ForgeUtils;
|
||||
@ -105,10 +105,10 @@ index 99af41b3..69a44db1 100644
|
||||
@Getter
|
||||
@NonNull
|
||||
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 2622b738..3c4ecf0e 100644
|
||||
index e20be624..5c54ec21 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
|
||||
@@ -318,6 +318,12 @@ public abstract class EntityMap
|
||||
@@ -316,6 +316,12 @@ public abstract class EntityMap
|
||||
int packetId = DefinedPacket.readVarInt( packet );
|
||||
int packetIdLength = packet.readerIndex() - readerIndex;
|
||||
|
||||
@ -122,5 +122,5 @@ index 2622b738..3c4ecf0e 100644
|
||||
{
|
||||
rewriteInt( packet, oldId, newId, readerIndex + packetIdLength );
|
||||
--
|
||||
2.25.1
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c931ce5a2f95001b88cf81d6b3a117ff704c838c Mon Sep 17 00:00:00 2001
|
||||
From 7ec9385c6596308ff25a88e8f9aecacce695d2a5 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Donath <johannesd@torchmind.com>
|
||||
Date: Sat, 4 Jul 2015 06:31:33 +0200
|
||||
Subject: [PATCH] Add basic support for configurable tab-complete throttling
|
||||
@ -73,10 +73,10 @@ index 741ebfde..91743f01 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
index d93efd87..31777d93 100644
|
||||
index f150d8fa..49fec0d7 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
@@ -38,6 +38,8 @@ public class UpstreamBridge extends PacketHandler
|
||||
@@ -39,6 +39,8 @@ public class UpstreamBridge extends PacketHandler
|
||||
private final ProxyServer bungee;
|
||||
private final UserConnection con;
|
||||
|
||||
@ -85,7 +85,7 @@ index d93efd87..31777d93 100644
|
||||
public UpstreamBridge(ProxyServer bungee, UserConnection con)
|
||||
{
|
||||
this.bungee = bungee;
|
||||
@@ -157,6 +159,20 @@ public class UpstreamBridge extends PacketHandler
|
||||
@@ -162,6 +164,20 @@ public class UpstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public void handle(TabCompleteRequest tabComplete) throws Exception
|
||||
{
|
||||
@ -107,5 +107,5 @@ index d93efd87..31777d93 100644
|
||||
|
||||
if ( tabComplete.getCursor().startsWith( "/" ) )
|
||||
--
|
||||
2.26.2
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fea07e8bc296e5c62b263660a9c515d8364a45f3 Mon Sep 17 00:00:00 2001
|
||||
From 21937b942f19419a3ff746c081c97cc4e654ca0f Mon Sep 17 00:00:00 2001
|
||||
From: Janmm14 <computerjanimaus@yahoo.de>
|
||||
Date: Sat, 12 Dec 2015 23:43:30 +0100
|
||||
Subject: [PATCH] Improve server list ping logging
|
||||
@ -7,7 +7,7 @@ This functionality of this patch was adopted upstream, however, this
|
||||
patch remains for a few misc improvements around here
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
index 7ef80bf5..97b7f236 100644
|
||||
index eb8ae99a..934ad406 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
@@ -442,6 +442,6 @@ public class ServerConnector extends PacketHandler
|
||||
@ -19,10 +19,10 @@ index 7ef80bf5..97b7f236 100644
|
||||
}
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index 1ee9510b..d9a52c88 100644
|
||||
index d1e57953..11bdceef 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -630,6 +630,6 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -635,6 +635,6 @@ public class DownstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
@ -57,10 +57,10 @@ index 853d717a..7ca502c0 100644
|
||||
|
||||
@Override
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
index 31777d93..cc141a11 100644
|
||||
index 49fec0d7..a2f36f23 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
@@ -271,6 +271,6 @@ public class UpstreamBridge extends PacketHandler
|
||||
@@ -276,6 +276,6 @@ public class UpstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
@ -69,5 +69,5 @@ index 31777d93..cc141a11 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 344390c0a58152ef43ad574901330337406d41cf Mon Sep 17 00:00:00 2001
|
||||
From 76e7f32f689d050b70f77d3a28f41e86f242890a Mon Sep 17 00:00:00 2001
|
||||
From: Tux <write@imaginarycode.com>
|
||||
Date: Tue, 25 Oct 2016 12:34:41 -0400
|
||||
Subject: [PATCH] Validate that chat messages are non-blank
|
||||
@ -33,7 +33,7 @@ index 00000000..940ad806
|
||||
+ }
|
||||
+}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
index cc141a11..7913d40c 100644
|
||||
index a2f36f23..4d7b1b23 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
||||
@@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
||||
@ -44,7 +44,7 @@ index cc141a11..7913d40c 100644
|
||||
import io.netty.channel.Channel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
@@ -143,6 +144,7 @@ public class UpstreamBridge extends PacketHandler
|
||||
@@ -148,6 +149,7 @@ public class UpstreamBridge extends PacketHandler
|
||||
{
|
||||
int maxLength = ( con.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_11 ) ? 256 : 100;
|
||||
Preconditions.checkArgument( chat.getMessage().length() <= maxLength, "Chat message too long" ); // Mojang limit, check on updates
|
||||
@ -53,5 +53,5 @@ index cc141a11..7913d40c 100644
|
||||
ChatEvent chatEvent = new ChatEvent( con, con.getServer(), chat.getMessage() );
|
||||
if ( !bungee.getPluginManager().callEvent( chatEvent ).isCancelled() )
|
||||
--
|
||||
2.26.2
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 816a1028af26164e49617c2d532fcc7998dcf537 Mon Sep 17 00:00:00 2001
|
||||
From 0ff39b86f3d2919ad03d26d9de587c2de8ce4692 Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Poirier <nathan@poirier.io>
|
||||
Date: Tue, 28 Jun 2016 23:00:49 -0500
|
||||
Subject: [PATCH] Improve ServerKickEvent
|
||||
@ -62,7 +62,7 @@ index 0e1ef5c4..ee63732d 100644
|
||||
@Deprecated
|
||||
public String getKickReason()
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
index 97b7f236..6ec13579 100644
|
||||
index 934ad406..2b762d4f 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
@@ -365,7 +365,7 @@ public class ServerConnector extends PacketHandler
|
||||
@ -75,7 +75,7 @@ index 97b7f236..6ec13579 100644
|
||||
{
|
||||
// Pre cancel the event if we are going to try another server
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index d9a52c88..b83903df 100644
|
||||
index 11bdceef..4e5b3541 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -12,6 +12,7 @@ import com.mojang.brigadier.context.StringRange;
|
||||
@ -86,7 +86,7 @@ index d9a52c88..b83903df 100644
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufAllocator;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@@ -79,16 +80,19 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -80,16 +81,19 @@ public class DownstreamBridge extends PacketHandler
|
||||
return;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index d9a52c88..b83903df 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,7 +107,19 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -104,7 +108,19 @@ public class DownstreamBridge extends PacketHandler
|
||||
|
||||
if ( !server.isObsolete() )
|
||||
{
|
||||
@ -132,7 +132,7 @@ index d9a52c88..b83903df 100644
|
||||
}
|
||||
|
||||
ServerDisconnectEvent serverDisconnectEvent = new ServerDisconnectEvent( con, server.getInfo() );
|
||||
@@ -514,7 +530,11 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -519,7 +535,11 @@ public class DownstreamBridge extends PacketHandler
|
||||
public void handle(Kick kick) throws Exception
|
||||
{
|
||||
ServerInfo def = con.updateAndGetNextServer( server.getInfo() );
|
||||
@ -146,5 +146,5 @@ index d9a52c88..b83903df 100644
|
||||
{
|
||||
con.connectNow( event.getCancelServer(), ServerConnectEvent.Reason.KICK_REDIRECT );
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1cd7701d75daa4942b046e1f7fc10368b2153c3a Mon Sep 17 00:00:00 2001
|
||||
From ccbd921b22378ca421f9820a40199ac4885b8ee6 Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Hill <aa1ronham@gmail.com>
|
||||
Date: Thu, 15 Sep 2016 22:38:37 +0200
|
||||
Subject: [PATCH] Fix potion race condition on Forge 1.8.9
|
||||
@ -33,7 +33,7 @@ index ac31e435..252389bd 100644
|
||||
+ // Waterfall end
|
||||
}
|
||||
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 fa34de48..346d8971 100644
|
||||
index 50a911c2..66c925d0 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
|
||||
@@ -17,6 +17,8 @@ import net.md_5.bungee.protocol.packet.EncryptionRequest;
|
||||
@ -45,7 +45,7 @@ index fa34de48..346d8971 100644
|
||||
import net.md_5.bungee.protocol.packet.Handshake;
|
||||
import net.md_5.bungee.protocol.packet.KeepAlive;
|
||||
import net.md_5.bungee.protocol.packet.Kick;
|
||||
@@ -103,6 +105,31 @@ public enum Protocol
|
||||
@@ -106,6 +108,32 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x0D ),
|
||||
map( ProtocolConstants.MINECRAFT_1_16, 0x0C )
|
||||
);
|
||||
@ -71,7 +71,8 @@ index fa34de48..346d8971 100644
|
||||
+ map(ProtocolConstants.MINECRAFT_1_13, 0x36),
|
||||
+ map(ProtocolConstants.MINECRAFT_1_14, 0x38),
|
||||
+ map(ProtocolConstants.MINECRAFT_1_15, 0x39),
|
||||
+ map(ProtocolConstants.MINECRAFT_1_16, 0x38)
|
||||
+ map(ProtocolConstants.MINECRAFT_1_16, 0x38),
|
||||
+ map(ProtocolConstants.MINECRAFT_1_16_2, 0x37)
|
||||
+ );
|
||||
+ // Waterfall end
|
||||
TO_CLIENT.registerPacket(
|
||||
@ -196,10 +197,10 @@ index 76ab1481..fae9805c 100644
|
||||
@Getter
|
||||
private String displayName;
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index b83903df..2e1c6a4c 100644
|
||||
index 4e5b3541..4dab32b4 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -51,6 +51,8 @@ import net.md_5.bungee.protocol.PacketWrapper;
|
||||
@@ -52,6 +52,8 @@ import net.md_5.bungee.protocol.PacketWrapper;
|
||||
import net.md_5.bungee.protocol.ProtocolConstants;
|
||||
import net.md_5.bungee.protocol.packet.BossBar;
|
||||
import net.md_5.bungee.protocol.packet.Commands;
|
||||
@ -208,7 +209,7 @@ index b83903df..2e1c6a4c 100644
|
||||
import net.md_5.bungee.protocol.packet.KeepAlive;
|
||||
import net.md_5.bungee.protocol.packet.Kick;
|
||||
import net.md_5.bungee.protocol.packet.PlayerListItem;
|
||||
@@ -615,6 +617,32 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -620,6 +622,32 @@ public class DownstreamBridge extends PacketHandler
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,5 +280,5 @@ index d15044f4..bea2bbff 100644
|
||||
* Sends the server mod list to the client, or stores it for sending later.
|
||||
*
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0262fa3c59530531670606fb65d346634019a360 Mon Sep 17 00:00:00 2001
|
||||
From a7048eccf962db2eb15adbbac1ce478622bf881a Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Mon, 14 Jan 2019 03:35:21 +0000
|
||||
Subject: [PATCH] Provide an option to disable entity metadata rewriting
|
||||
@ -57,7 +57,7 @@ index 4ff8da6d..e860214f 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
index 6ec13579..78401dae 100644
|
||||
index 2b762d4f..b486f2aa 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
@@ -228,7 +228,7 @@ public class ServerConnector extends PacketHandler
|
||||
@ -108,7 +108,7 @@ index 6ec13579..78401dae 100644
|
||||
+ user.unsafe().sendPacket( new Respawn( (Integer) user.getDimension() >= 0 ? -1 : 0, login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), false ) );
|
||||
+ }
|
||||
+
|
||||
+ Login modLogin = new Login( login.getEntityId(), login.getGameMode(), login.getPreviousGameMode(), login.getWorldNames(), login.getDimensions(), login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(),
|
||||
+ Login modLogin = new Login( login.getEntityId(), login.isHardcore(), login.getGameMode(), login.getPreviousGameMode(), login.getWorldNames(), login.getDimensions(), login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(),
|
||||
+ (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat() );
|
||||
+ user.unsafe().sendPacket(modLogin);
|
||||
+
|
||||
@ -138,10 +138,10 @@ index fae9805c..b0125245 100644
|
||||
+ // Waterfall end
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index 2e1c6a4c..09bbe594 100644
|
||||
index 4dab32b4..9ce48a40 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -621,6 +621,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -626,6 +626,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public void handle(EntityEffect entityEffect) throws Exception
|
||||
{
|
||||
@ -149,7 +149,7 @@ index 2e1c6a4c..09bbe594 100644
|
||||
// Don't send any potions when switching between servers (which involves a handshake), which can trigger a race
|
||||
// condition on the client.
|
||||
if (this.con.getForgeClientHandler().isForgeUser() && !this.con.getForgeClientHandler().isHandshakeComplete()) {
|
||||
@@ -632,6 +633,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -637,6 +638,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public void handle(EntityRemoveEffect removeEffect) throws Exception
|
||||
{
|
||||
@ -158,7 +158,7 @@ index 2e1c6a4c..09bbe594 100644
|
||||
}
|
||||
|
||||
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 3c4ecf0e..e64a11b5 100644
|
||||
index 5c54ec21..45f4449c 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
|
||||
@@ -6,6 +6,7 @@ import io.netty.buffer.ByteBufInputStream;
|
||||
@ -181,7 +181,7 @@ index 3c4ecf0e..e64a11b5 100644
|
||||
switch ( version )
|
||||
{
|
||||
case ProtocolConstants.MINECRAFT_1_8:
|
||||
@@ -280,7 +286,13 @@ public abstract class EntityMap
|
||||
@@ -278,7 +284,13 @@ public abstract class EntityMap
|
||||
DefinedPacket.readVarInt( packet );
|
||||
break;
|
||||
default:
|
||||
@ -234,5 +234,5 @@ index 00000000..cb81d1dd
|
||||
+// Waterfall end
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7b52b8c28a68b2738ba4ca457a00f75d40959539 Mon Sep 17 00:00:00 2001
|
||||
From 63ae6c45b92d9913a10439b15c9c1af70472adfe Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Thu, 14 Mar 2019 07:44:06 +0000
|
||||
Subject: [PATCH] Add ProxyDefineCommandsEvent
|
||||
@ -54,7 +54,7 @@ index 00000000..1fd4fc90
|
||||
+
|
||||
+}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index 09bbe594..acedbefe 100644
|
||||
index 9ce48a40..4a60ba5b 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -12,7 +12,8 @@ import com.mojang.brigadier.context.StringRange;
|
||||
@ -78,7 +78,7 @@ index 09bbe594..acedbefe 100644
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.md_5.bungee.ServerConnection;
|
||||
import net.md_5.bungee.ServerConnection.KeepAliveData;
|
||||
@@ -656,9 +659,25 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -661,9 +664,25 @@ public class DownstreamBridge extends PacketHandler
|
||||
{
|
||||
boolean modified = false;
|
||||
|
||||
@ -107,5 +107,5 @@ index 09bbe594..acedbefe 100644
|
||||
LiteralCommandNode dummy = LiteralArgumentBuilder.literal( command.getKey() )
|
||||
.then( RequiredArgumentBuilder.argument( "args", StringArgumentType.greedyString() )
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
From d787491efd13f07ef27ced2319979b24b72847a0 Mon Sep 17 00:00:00 2001
|
||||
From 6b09cf65b62b9e493e483abfe6f5caa71314cf72 Mon Sep 17 00:00:00 2001
|
||||
From: kashike <kashike@vq.lc>
|
||||
Date: Wed, 20 Mar 2019 21:39:12 -0700
|
||||
Subject: [PATCH] Use proper max length for serverbound chat packet
|
||||
|
||||
|
||||
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
|
||||
index 57155c3b..9951c1f9 100644
|
||||
index f4470588..4b006833 100644
|
||||
--- a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
|
||||
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
|
||||
@@ -37,6 +37,34 @@ public abstract class DefinedPacket
|
||||
@@ -45,6 +45,34 @@ public abstract class DefinedPacket
|
||||
return new String( b, Charsets.UTF_8 );
|
||||
}
|
||||
|
||||
@ -72,5 +72,5 @@ index b5615a9f..d2a4dea6 100644
|
||||
if ( direction == ProtocolConstants.Direction.TO_CLIENT )
|
||||
{
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
From e413f0e0f0a2f303075c1ae8d7b5074caa30b96d Mon Sep 17 00:00:00 2001
|
||||
From dc148013708fe031509a9aa1592078bd0b59731f Mon Sep 17 00:00:00 2001
|
||||
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
||||
Date: Wed, 17 Apr 2019 09:24:38 +0300
|
||||
Subject: [PATCH] Speed up packet construction
|
||||
|
||||
|
||||
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 3214b30d..bf282cf0 100644
|
||||
index 66c925d0..d372933d 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
|
||||
@@ -54,6 +54,7 @@ public enum Protocol
|
||||
@ -24,7 +24,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x00 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x1F ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x21 ),
|
||||
@@ -74,6 +76,7 @@ public enum Protocol
|
||||
@@ -75,6 +77,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Login.class,
|
||||
@ -32,7 +32,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x01 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x23 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x25 ),
|
||||
@@ -82,6 +85,7 @@ public enum Protocol
|
||||
@@ -84,6 +87,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Chat.class,
|
||||
@ -40,7 +40,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x02 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x0F ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x0E ),
|
||||
@@ -90,6 +94,7 @@ public enum Protocol
|
||||
@@ -92,6 +96,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Respawn.class,
|
||||
@ -48,7 +48,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x07 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x33 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x34 ),
|
||||
@@ -101,6 +106,7 @@ public enum Protocol
|
||||
@@ -104,6 +109,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
BossBar.class,
|
||||
@ -56,7 +56,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x0C ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x0D ),
|
||||
map( ProtocolConstants.MINECRAFT_1_16, 0x0C )
|
||||
@@ -108,6 +114,7 @@ public enum Protocol
|
||||
@@ -111,6 +117,7 @@ public enum Protocol
|
||||
// Waterfall start
|
||||
TO_CLIENT.registerPacket(
|
||||
EntityEffect.class,
|
||||
@ -64,7 +64,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map(ProtocolConstants.MINECRAFT_1_8, 0x1D),
|
||||
map(ProtocolConstants.MINECRAFT_1_9, 0x4C),
|
||||
map(ProtocolConstants.MINECRAFT_1_9_4, 0x4B),
|
||||
@@ -120,6 +127,7 @@ public enum Protocol
|
||||
@@ -123,6 +130,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
EntityRemoveEffect.class,
|
||||
@ -72,7 +72,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map(ProtocolConstants.MINECRAFT_1_8, 0x1E),
|
||||
map(ProtocolConstants.MINECRAFT_1_9, 0x31),
|
||||
map(ProtocolConstants.MINECRAFT_1_12, 0x32),
|
||||
@@ -132,6 +140,7 @@ public enum Protocol
|
||||
@@ -136,6 +144,7 @@ public enum Protocol
|
||||
// Waterfall end
|
||||
TO_CLIENT.registerPacket(
|
||||
PlayerListItem.class, // PlayerInfo
|
||||
@ -80,7 +80,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x38 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x2D ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12_1, 0x2E ),
|
||||
@@ -142,6 +151,7 @@ public enum Protocol
|
||||
@@ -147,6 +156,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
TabCompleteResponse.class,
|
||||
@ -88,7 +88,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x3A ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x0E ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x10 ),
|
||||
@@ -150,6 +160,7 @@ public enum Protocol
|
||||
@@ -156,6 +166,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
ScoreboardObjective.class,
|
||||
@ -96,7 +96,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x3B ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x3F ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x41 ),
|
||||
@@ -160,6 +171,7 @@ public enum Protocol
|
||||
@@ -166,6 +177,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
ScoreboardScore.class,
|
||||
@ -104,7 +104,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x3C ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x42 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x44 ),
|
||||
@@ -170,6 +182,7 @@ public enum Protocol
|
||||
@@ -176,6 +188,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
ScoreboardDisplay.class,
|
||||
@ -112,7 +112,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x3D ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x38 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x3A ),
|
||||
@@ -180,6 +193,7 @@ public enum Protocol
|
||||
@@ -186,6 +199,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Team.class,
|
||||
@ -120,7 +120,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x3E ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x41 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x43 ),
|
||||
@@ -190,6 +204,7 @@ public enum Protocol
|
||||
@@ -196,6 +210,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
PluginMessage.class,
|
||||
@ -128,7 +128,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x3F ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x18 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x19 ),
|
||||
@@ -199,6 +214,7 @@ public enum Protocol
|
||||
@@ -206,6 +221,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Kick.class,
|
||||
@ -136,7 +136,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x40 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x1A ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x1B ),
|
||||
@@ -208,6 +224,7 @@ public enum Protocol
|
||||
@@ -216,6 +232,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Title.class,
|
||||
@ -144,7 +144,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x45 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x47 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12_1, 0x48 ),
|
||||
@@ -218,6 +235,7 @@ public enum Protocol
|
||||
@@ -226,6 +243,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
PlayerListHeaderFooter.class,
|
||||
@ -152,7 +152,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x47 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x48 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9_4, 0x47 ),
|
||||
@@ -230,6 +248,7 @@ public enum Protocol
|
||||
@@ -238,6 +256,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
EntityStatus.class,
|
||||
@ -160,22 +160,22 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x1A ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x1B ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x1C ),
|
||||
@@ -239,17 +258,21 @@ public enum Protocol
|
||||
@@ -248,6 +267,7 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Commands.class,
|
||||
+ Commands::new, // Waterfall - speed up packet construction
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x11 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x12 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_16, 0x11 )
|
||||
map( ProtocolConstants.MINECRAFT_1_16, 0x11 ),
|
||||
@@ -255,12 +275,14 @@ public enum Protocol
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
GameState.class,
|
||||
+ GameState::new, // Waterfall - speed up packet construction
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x1F ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x1E )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x1E ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_15, 0x1F )
|
||||
map( ProtocolConstants.MINECRAFT_1_16, 0x1E ),
|
||||
map( ProtocolConstants.MINECRAFT_1_16_2, 0x1D )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
ViewDistance.class,
|
||||
@ -183,7 +183,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_14, 0x41 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x42 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_16, 0x41 )
|
||||
@@ -257,6 +280,7 @@ public enum Protocol
|
||||
@@ -268,6 +290,7 @@ public enum Protocol
|
||||
|
||||
TO_SERVER.registerPacket(
|
||||
KeepAlive.class,
|
||||
@ -191,7 +191,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x00 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x0B ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x0C ),
|
||||
@@ -267,6 +291,7 @@ public enum Protocol
|
||||
@@ -278,6 +301,7 @@ public enum Protocol
|
||||
);
|
||||
TO_SERVER.registerPacket(
|
||||
Chat.class,
|
||||
@ -199,7 +199,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x01 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x02 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x03 ),
|
||||
@@ -275,6 +300,7 @@ public enum Protocol
|
||||
@@ -286,6 +310,7 @@ public enum Protocol
|
||||
);
|
||||
TO_SERVER.registerPacket(
|
||||
TabCompleteRequest.class,
|
||||
@ -207,7 +207,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x14 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x01 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x02 ),
|
||||
@@ -284,6 +310,7 @@ public enum Protocol
|
||||
@@ -295,6 +320,7 @@ public enum Protocol
|
||||
);
|
||||
TO_SERVER.registerPacket(
|
||||
ClientSettings.class,
|
||||
@ -215,7 +215,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x15 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x04 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x05 ),
|
||||
@@ -292,6 +319,7 @@ public enum Protocol
|
||||
@@ -303,6 +329,7 @@ public enum Protocol
|
||||
);
|
||||
TO_SERVER.registerPacket(
|
||||
PluginMessage.class,
|
||||
@ -223,7 +223,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x17 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x09 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_12, 0x0A ),
|
||||
@@ -308,19 +336,23 @@ public enum Protocol
|
||||
@@ -319,19 +346,23 @@ public enum Protocol
|
||||
{
|
||||
TO_CLIENT.registerPacket(
|
||||
StatusResponse.class,
|
||||
@ -247,7 +247,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_8, 0x01 )
|
||||
);
|
||||
}
|
||||
@@ -332,35 +364,43 @@ public enum Protocol
|
||||
@@ -343,35 +374,43 @@ public enum Protocol
|
||||
{
|
||||
TO_CLIENT.registerPacket(
|
||||
Kick.class,
|
||||
@ -291,7 +291,7 @@ index 3214b30d..bf282cf0 100644
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x02 )
|
||||
);
|
||||
}
|
||||
@@ -411,7 +451,7 @@ public enum Protocol
|
||||
@@ -422,7 +461,7 @@ public enum Protocol
|
||||
|
||||
private final int protocolVersion;
|
||||
private final TObjectIntMap<Class<? extends DefinedPacket>> packetMap = new TObjectIntHashMap<>( MAX_PACKET_ID );
|
||||
@ -300,7 +300,7 @@ index 3214b30d..bf282cf0 100644
|
||||
}
|
||||
|
||||
@Data
|
||||
@@ -479,21 +519,24 @@ public enum Protocol
|
||||
@@ -490,21 +529,24 @@ public enum Protocol
|
||||
throw new BadPacketException( "Packet with id " + id + " outside of range " );
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ index 3214b30d..bf282cf0 100644
|
||||
|
||||
int mappingIndex = 0;
|
||||
ProtocolMapping mapping = mappings[mappingIndex];
|
||||
@@ -522,11 +565,32 @@ public enum Protocol
|
||||
@@ -533,11 +575,32 @@ public enum Protocol
|
||||
data.packetMap.put( packetClass, mapping.packetID );
|
||||
data.packetConstructors[mapping.packetID] = constructor;
|
||||
}
|
||||
@ -363,5 +363,5 @@ index 3214b30d..bf282cf0 100644
|
||||
final int getId(Class<? extends DefinedPacket> packet, int version)
|
||||
{
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9439649fae593bf183d39fa3337457ef60a91acf Mon Sep 17 00:00:00 2001
|
||||
From 0512eeec0c47f8619716ff7aa0cf89684ddafb4a Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Mon, 25 Nov 2019 19:54:06 +0000
|
||||
Subject: [PATCH] Speed up some common exceptions
|
||||
@ -67,10 +67,10 @@ index 6c0ef4df..f20104a2 100644
|
||||
+ // Waterfall end
|
||||
}
|
||||
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
|
||||
index 9951c1f9..68c716b9 100644
|
||||
index 4b006833..f6e4859f 100644
|
||||
--- a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
|
||||
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
|
||||
@@ -11,6 +11,9 @@ import lombok.RequiredArgsConstructor;
|
||||
@@ -19,6 +19,9 @@ import se.llbit.nbt.Tag;
|
||||
public abstract class DefinedPacket
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ index 9951c1f9..68c716b9 100644
|
||||
public static void writeString(String s, ByteBuf buf)
|
||||
{
|
||||
if ( s.length() > Short.MAX_VALUE )
|
||||
@@ -145,13 +148,18 @@ public abstract class DefinedPacket
|
||||
@@ -153,13 +156,18 @@ public abstract class DefinedPacket
|
||||
byte in;
|
||||
while ( true )
|
||||
{
|
||||
@ -167,5 +167,5 @@ index ac99d02c..0c1ecfb8 100644
|
||||
|
||||
// Waterfall start
|
||||
--
|
||||
2.25.1
|
||||
2.24.0
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 7d0ff3686f968b5124d2c0f2ad0dda5f10f9dc20 Mon Sep 17 00:00:00 2001
|
||||
From 4642c2478a65a01c7e5cefc3827e2e546664e7d7 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 20 Jun 2020 18:21:17 +0100
|
||||
Subject: [PATCH] Remove version from brand info
|
||||
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index acedbefe..8c7e3ab8 100644
|
||||
index 4a60ba5b..44e6ed3f 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -282,7 +282,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
@@ -287,7 +287,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
Preconditions.checkState( !serverBrand.contains( bungee.getName() ), "Cannot connect proxy to itself!" );
|
||||
|
||||
brand = ByteBufAllocator.DEFAULT.heapBuffer();
|
||||
@ -18,5 +18,5 @@ index acedbefe..8c7e3ab8 100644
|
||||
brand.release();
|
||||
// changes in the packet are ignored so we need to send it manually
|
||||
--
|
||||
2.27.0
|
||||
2.24.0
|
||||
|
||||
|
@ -1,385 +0,0 @@
|
||||
From 410bda8afddf6865905cf495afd65da36740f224 Mon Sep 17 00:00:00 2001
|
||||
From: "Five (Xer)" <admin@xernium.com>
|
||||
Date: Tue, 11 Aug 2020 20:03:28 +0200
|
||||
Subject: [PATCH] Waterfall 1.16.2-patch
|
||||
|
||||
|
||||
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 546564fb..e2a02360 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
|
||||
@@ -72,7 +72,8 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x21 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_14, 0x20 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x21 ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x20 )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x20 ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x1F )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Login.class,
|
||||
@@ -81,7 +82,8 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x23 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x25 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x26 ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x25 )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x25 ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x24 )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Chat.class,
|
||||
@@ -102,7 +104,8 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x38 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_14, 0x3A ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x3B ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x3A )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x3A ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x39 )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
BossBar.class,
|
||||
@@ -135,7 +138,8 @@ public enum Protocol
|
||||
map(ProtocolConstants.MINECRAFT_1_13, 0x36),
|
||||
map(ProtocolConstants.MINECRAFT_1_14, 0x38),
|
||||
map(ProtocolConstants.MINECRAFT_1_15, 0x39),
|
||||
- map(ProtocolConstants.MINECRAFT_1_16, 0x38)
|
||||
+ map(ProtocolConstants.MINECRAFT_1_16, 0x38),
|
||||
+ map(ProtocolConstants.MINECRAFT_1_16_2, 0x37)
|
||||
);
|
||||
// Waterfall end
|
||||
TO_CLIENT.registerPacket(
|
||||
@@ -147,7 +151,8 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x30 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_14, 0x33 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x34 ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x33 )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x33 ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x32 )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
TabCompleteResponse.class,
|
||||
@@ -156,7 +161,8 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_9, 0x0E ),
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x10 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x11 ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x10 )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x10 ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x0F )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
ScoreboardObjective.class,
|
||||
@@ -210,7 +216,8 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x19 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_14, 0x18 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x19 ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x18 )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x18 ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x17 )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Kick.class,
|
||||
@@ -220,7 +227,8 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x1B ),
|
||||
map( ProtocolConstants.MINECRAFT_1_14, 0x1A ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x1B ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x1A )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x1A ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x19 )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Title.class,
|
||||
@@ -254,21 +262,24 @@ public enum Protocol
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x1C ),
|
||||
map( ProtocolConstants.MINECRAFT_1_14, 0x1B ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x1C ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x1B )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x1B ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x1A )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
Commands.class,
|
||||
Commands::new, // Waterfall - speed up packet construction
|
||||
map( ProtocolConstants.MINECRAFT_1_13, 0x11 ),
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x12 ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_16, 0x11 )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16, 0x11 ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x10 )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
GameState.class,
|
||||
GameState::new, // Waterfall - speed up packet construction
|
||||
map( ProtocolConstants.MINECRAFT_1_15, 0x1F ),
|
||||
map( ProtocolConstants.MINECRAFT_1_16, 0x1E ),
|
||||
- map( ProtocolConstants.MINECRAFT_1_15, 0x1F )
|
||||
+ map( ProtocolConstants.MINECRAFT_1_15, 0x1F ),
|
||||
+ map( ProtocolConstants.MINECRAFT_1_16_2, 0x1E )
|
||||
);
|
||||
TO_CLIENT.registerPacket(
|
||||
ViewDistance.class,
|
||||
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 a82f2ec8..aa1b770c 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
|
||||
@@ -30,6 +30,7 @@ public class ProtocolConstants
|
||||
public static final int MINECRAFT_1_15_2 = 578;
|
||||
public static final int MINECRAFT_1_16 = 735;
|
||||
public static final int MINECRAFT_1_16_1 = 736;
|
||||
+ public static final int MINECRAFT_1_16_2 = 751;
|
||||
public static final List<String> SUPPORTED_VERSIONS = Arrays.asList(
|
||||
"1.8.x",
|
||||
"1.9.x",
|
||||
@@ -65,7 +66,8 @@ public class ProtocolConstants
|
||||
ProtocolConstants.MINECRAFT_1_15_1,
|
||||
ProtocolConstants.MINECRAFT_1_15_2,
|
||||
ProtocolConstants.MINECRAFT_1_16,
|
||||
- ProtocolConstants.MINECRAFT_1_16_1
|
||||
+ ProtocolConstants.MINECRAFT_1_16_1,
|
||||
+ ProtocolConstants.MINECRAFT_1_16_2
|
||||
);
|
||||
|
||||
public static final boolean isBeforeOrEq(int before, int other)
|
||||
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java
|
||||
index 2b1c8377..1330cac2 100644
|
||||
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java
|
||||
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java
|
||||
@@ -550,6 +550,7 @@ public class Commands extends DefinedPacket
|
||||
PROVIDERS.put( "minecraft:uuid", VOID ); // 1.16
|
||||
PROVIDERS.put( "minecraft:test_argument", VOID ); // 1.16, debug
|
||||
PROVIDERS.put( "minecraft:test_class", VOID ); // 1.16, debug
|
||||
+ PROVIDERS.put( "minecraft:angle", VOID ); // 1.16
|
||||
}
|
||||
|
||||
private static ArgumentType<?> read(String key, ByteBuf buf)
|
||||
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Login.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Login.java
|
||||
index 6ca80e2b..8f02538e 100644
|
||||
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Login.java
|
||||
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Login.java
|
||||
@@ -35,19 +35,29 @@ public class Login extends DefinedPacket
|
||||
private String worldName;
|
||||
private long seed;
|
||||
private short difficulty;
|
||||
- private short maxPlayers;
|
||||
+ private int maxPlayers;
|
||||
private String levelType;
|
||||
private int viewDistance;
|
||||
private boolean reducedDebugInfo;
|
||||
private boolean normalRespawn;
|
||||
private boolean debug;
|
||||
private boolean flat;
|
||||
+ private boolean hardcoreMode;
|
||||
|
||||
@Override
|
||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||
{
|
||||
entityId = buf.readInt();
|
||||
- gameMode = buf.readUnsignedByte();
|
||||
+ if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ hardcoreMode = buf.readBoolean();
|
||||
+ gameMode = buf.readByte();
|
||||
+ } else
|
||||
+ {
|
||||
+ gameMode = buf.readByte();
|
||||
+ hardcoreMode = (gameMode & 0x08) != 0;
|
||||
+ gameMode &= ~0x08;
|
||||
+ }
|
||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
previousGameMode = buf.readUnsignedByte();
|
||||
@@ -67,7 +77,13 @@ public class Login extends DefinedPacket
|
||||
|
||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
- dimension = readString( buf );
|
||||
+ if ( protocolVersion < ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ dimension = readString( buf );
|
||||
+
|
||||
+ } else {
|
||||
+ dimension = NamedTag.read( new DataInputStream( new ByteBufInputStream( buf ) ) );
|
||||
+ }
|
||||
worldName = readString( buf );
|
||||
} else if ( protocolVersion > ProtocolConstants.MINECRAFT_1_9 )
|
||||
{
|
||||
@@ -84,7 +100,12 @@ public class Login extends DefinedPacket
|
||||
{
|
||||
difficulty = buf.readUnsignedByte();
|
||||
}
|
||||
- maxPlayers = buf.readUnsignedByte();
|
||||
+ if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ maxPlayers = readVarInt( buf );
|
||||
+ } else {
|
||||
+ maxPlayers = buf.readUnsignedByte();
|
||||
+ }
|
||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
levelType = readString( buf );
|
||||
@@ -112,7 +133,14 @@ public class Login extends DefinedPacket
|
||||
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||
{
|
||||
buf.writeInt( entityId );
|
||||
- buf.writeByte( gameMode );
|
||||
+ if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ buf.writeBoolean( hardcoreMode );
|
||||
+ buf.writeByte( gameMode );
|
||||
+ } else
|
||||
+ {
|
||||
+ buf.writeByte( hardcoreMode ? gameMode | 0x8 : gameMode );
|
||||
+ }
|
||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
buf.writeByte( previousGameMode );
|
||||
@@ -134,7 +162,18 @@ public class Login extends DefinedPacket
|
||||
|
||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
- writeString( (String) dimension, buf );
|
||||
+ if ( protocolVersion < ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ writeString( (String) dimension, buf );
|
||||
+ } else {
|
||||
+ try
|
||||
+ {
|
||||
+ ((Tag) dimension).write( new DataOutputStream( new ByteBufOutputStream( buf ) ) );
|
||||
+ } catch ( IOException ex )
|
||||
+ {
|
||||
+ throw new RuntimeException( "Exception writing current dimension", ex );
|
||||
+ }
|
||||
+ }
|
||||
writeString( worldName, buf );
|
||||
} else if ( protocolVersion > ProtocolConstants.MINECRAFT_1_9 )
|
||||
{
|
||||
@@ -151,7 +190,13 @@ public class Login extends DefinedPacket
|
||||
{
|
||||
buf.writeByte( difficulty );
|
||||
}
|
||||
- buf.writeByte( maxPlayers );
|
||||
+ if( protocolVersion >= ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ writeVarInt( maxPlayers, buf );
|
||||
+ } else
|
||||
+ {
|
||||
+ buf.writeByte( maxPlayers );
|
||||
+ }
|
||||
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
writeString( levelType, buf );
|
||||
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Respawn.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Respawn.java
|
||||
index 0d8068ea..ef78db16 100644
|
||||
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Respawn.java
|
||||
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Respawn.java
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.md_5.bungee.protocol.packet;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
+import io.netty.buffer.ByteBufInputStream;
|
||||
+import io.netty.buffer.ByteBufOutputStream;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -8,6 +10,12 @@ import lombok.NoArgsConstructor;
|
||||
import net.md_5.bungee.protocol.AbstractPacketHandler;
|
||||
import net.md_5.bungee.protocol.DefinedPacket;
|
||||
import net.md_5.bungee.protocol.ProtocolConstants;
|
||||
+import se.llbit.nbt.NamedTag;
|
||||
+import se.llbit.nbt.Tag;
|
||||
+
|
||||
+import java.io.DataInputStream;
|
||||
+import java.io.DataOutputStream;
|
||||
+import java.io.IOException;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@@ -32,7 +40,13 @@ public class Respawn extends DefinedPacket
|
||||
{
|
||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
- dimension = readString( buf );
|
||||
+ if( protocolVersion >= ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ dimension = NamedTag.read( new DataInputStream( new ByteBufInputStream( buf ) ) );
|
||||
+ } else
|
||||
+ {
|
||||
+ dimension = readString( buf );
|
||||
+ }
|
||||
worldName = readString( buf );
|
||||
} else
|
||||
{
|
||||
@@ -64,7 +78,19 @@ public class Respawn extends DefinedPacket
|
||||
{
|
||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_16 )
|
||||
{
|
||||
- writeString( (String) dimension, buf );
|
||||
+ if( protocolVersion >= ProtocolConstants.MINECRAFT_1_16_2 )
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ ((Tag) dimension).write( new DataOutputStream( new ByteBufOutputStream( buf ) ) );
|
||||
+ } catch ( IOException ex )
|
||||
+ {
|
||||
+ throw new RuntimeException( "Exception writing current Dimension (respawn)", ex );
|
||||
+ }
|
||||
+ } else
|
||||
+ {
|
||||
+ writeString( (String) dimension, buf );
|
||||
+ }
|
||||
writeString( worldName, buf );
|
||||
} else
|
||||
{
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
index 78401dae..c473acdb 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
@@ -54,6 +54,7 @@ import net.md_5.bungee.protocol.packet.SetCompression;
|
||||
import net.md_5.bungee.protocol.packet.ViewDistance;
|
||||
import net.md_5.bungee.util.BufUtil;
|
||||
import net.md_5.bungee.util.QuietException;
|
||||
+import se.llbit.nbt.Tag;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class ServerConnector extends PacketHandler
|
||||
@@ -246,7 +247,7 @@ public class ServerConnector extends PacketHandler
|
||||
|
||||
// Set tab list size, TODO: what shall we do about packet mutability
|
||||
Login modLogin = new Login( login.getEntityId(), login.getGameMode(), login.getPreviousGameMode(), login.getWorldNames(), login.getDimensions(), login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(),
|
||||
- (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat() );
|
||||
+ (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat(), login.isHardcoreMode() );
|
||||
|
||||
user.unsafe().sendPacket( modLogin );
|
||||
|
||||
@@ -264,7 +265,7 @@ public class ServerConnector extends PacketHandler
|
||||
}
|
||||
user.getSentBossBars().clear();
|
||||
|
||||
- user.unsafe().sendPacket( new Respawn( login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), false ) );
|
||||
+ user.unsafe().sendPacket( new Respawn( login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), false) );
|
||||
user.getServer().disconnect( "Quitting" );
|
||||
} else
|
||||
{
|
||||
@@ -332,7 +333,7 @@ public class ServerConnector extends PacketHandler
|
||||
}
|
||||
|
||||
Login modLogin = new Login( login.getEntityId(), login.getGameMode(), login.getPreviousGameMode(), login.getWorldNames(), login.getDimensions(), login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(),
|
||||
- (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat() );
|
||||
+ (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat(), login.isHardcoreMode() );
|
||||
user.unsafe().sendPacket(modLogin);
|
||||
|
||||
// Only send if we're in the same dimension
|
||||
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 e64a11b5..05947c40 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
|
||||
@@ -70,6 +70,8 @@ public abstract class EntityMap
|
||||
case ProtocolConstants.MINECRAFT_1_16:
|
||||
case ProtocolConstants.MINECRAFT_1_16_1:
|
||||
return EntityMap_1_16.INSTANCE;
|
||||
+ case ProtocolConstants.MINECRAFT_1_16_2:
|
||||
+ return EntityMap_Dummy.INSTANCE;
|
||||
}
|
||||
throw new RuntimeException( "Version " + version + " has no entity map" );
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
Loading…
Reference in New Issue
Block a user