Actually rebuilding patches goes a long way

This commit is contained in:
Shane Freeder 2020-03-07 22:50:46 +00:00
parent 54b7faf923
commit fda6406e25
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
13 changed files with 95 additions and 89 deletions

View File

@ -1,4 +1,4 @@
From c083e016c8b45b20eb2957e872533ae1eb2be1b3 Mon Sep 17 00:00:00 2001
From 783fcdadebdda2819fabc7650072d88e65382a1d Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Thu, 19 May 2016 11:28:45 -0700
Subject: [PATCH] Rename references from BungeeCord to Waterfall
@ -88,10 +88,10 @@ index efe048c9..720d0c3b 100644
}
}
diff --git a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
index bc7e3a0d..4c9a0054 100644
index c0620445..e65558ad 100644
--- a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
+++ b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
@@ -213,7 +213,7 @@ public class YamlConfig implements ConfigurationAdapter
@@ -216,7 +216,7 @@ public class YamlConfig implements ConfigurationAdapter
Map<String, Object> val = entry.getValue();
String name = entry.getKey();
String addr = get( "address", "localhost:25565", val );

View File

@ -1,4 +1,4 @@
From 96117eeb20c6213a829847d91d41f0b75f35f64b Mon Sep 17 00:00:00 2001
From 613341857eeec62fcc4f3adfcac77a9eadb7c2c0 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Tue, 25 Oct 2016 11:58:37 -0400
Subject: [PATCH] Add Waterfall configuration files
@ -76,10 +76,10 @@ index e1a6b2b3..56a0f29c 100644
/**
diff --git a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
index 4c9a0054..85c2a0b5 100644
index e65558ad..65121ba2 100644
--- a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
+++ b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
@@ -44,10 +44,15 @@ public class YamlConfig implements ConfigurationAdapter
@@ -47,10 +47,15 @@ public class YamlConfig implements ConfigurationAdapter
}
private final Yaml yaml;
private Map<String, Object> config;
@ -97,7 +97,7 @@ index 4c9a0054..85c2a0b5 100644
DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle( DumperOptions.FlowStyle.BLOCK );
yaml = new Yaml( options );
@@ -55,6 +60,11 @@ public class YamlConfig implements ConfigurationAdapter
@@ -58,6 +63,11 @@ public class YamlConfig implements ConfigurationAdapter
@Override
public void load()
@ -109,7 +109,7 @@ index 4c9a0054..85c2a0b5 100644
{
try
{
@@ -83,6 +93,7 @@ public class YamlConfig implements ConfigurationAdapter
@@ -86,6 +96,7 @@ public class YamlConfig implements ConfigurationAdapter
throw new RuntimeException( "Could not load configuration!", ex );
}

View File

@ -1,4 +1,4 @@
From b2b0879209daecbd7d19e05de07a6efbd00f3ee2 Mon Sep 17 00:00:00 2001
From 8502da833e5c18ffc55097e541f04289a00597fb 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,10 +43,10 @@ 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 2ebfef5e..15b9e66c 100644
index 65d4b0b1..6ed2bf92 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -218,7 +218,7 @@ public class ServerConnector extends PacketHandler
@@ -219,7 +219,7 @@ public class ServerConnector extends PacketHandler
ByteBuf brand = ByteBufAllocator.DEFAULT.heapBuffer();
DefinedPacket.writeString( bungee.getName() + " (" + bungee.getVersion() + ")", brand );

View File

@ -1,4 +1,4 @@
From 36f9a586c2ebfb7947ab641c721219ad21090f98 Mon Sep 17 00:00:00 2001
From ea20858832ab1b742e5a570cf3a6acaeee84db32 Mon Sep 17 00:00:00 2001
From: Daniel Naylor <git@drnaylor.co.uk>
Date: Tue, 25 Oct 2016 12:23:07 -0400
Subject: [PATCH] Add support for FML with IP Forwarding enabled
@ -12,7 +12,7 @@ However, there is now at least one Forge coremod that intends to support IP forw
No breaking changes occur due to this patch.
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 15b9e66c..e8fd2148 100644
index 6ed2bf92..674de454 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
@ -23,7 +23,7 @@ index 15b9e66c..e8fd2148 100644
import java.util.Queue;
import java.util.Set;
import java.util.UUID;
@@ -102,15 +103,39 @@ public class ServerConnector extends PacketHandler
@@ -103,15 +104,39 @@ public class ServerConnector extends PacketHandler
String newHost = copiedHandshake.getHost() + "\00" + user.getAddress().getHostString() + "\00" + user.getUUID();
LoginResult profile = user.getPendingConnection().getLoginProfile();
@ -67,7 +67,7 @@ index 15b9e66c..e8fd2148 100644
}
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index afcae3a2..8f369a3d 100644
index bb62e27d..e77804f8 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -163,8 +163,12 @@ public final class UserConnection implements ProxiedPlayer

View File

@ -1,4 +1,4 @@
From 1b1c3dbe43edb753e38f18730b6e6d43bf907d09 Mon Sep 17 00:00:00 2001
From 990153b9c40bd80f395eb4fa9983e57259e7019a 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 ea44573d..5b32effe 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 8c99ee85..31cbaa53 100644
index 3e3cf99e..17f2bf4c 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
@@ -410,14 +410,23 @@ public enum Protocol
@@ -415,14 +415,23 @@ public enum Protocol
return protocol;
}
@ -66,7 +66,7 @@ index 8c99ee85..31cbaa53 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 e8fd2148..e55d572a 100644
index 674de454..031ea985 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;
@ -79,7 +79,7 @@ index e8fd2148..e55d572a 100644
import net.md_5.bungee.protocol.PacketWrapper;
import net.md_5.bungee.protocol.Protocol;
import net.md_5.bungee.protocol.ProtocolConstants;
@@ -202,6 +204,12 @@ public class ServerConnector extends PacketHandler
@@ -203,6 +205,12 @@ public class ServerConnector extends PacketHandler
ServerConnection server = new ServerConnection( ch, target );
ServerConnectedEvent event = new ServerConnectedEvent( user, server );
@ -93,7 +93,7 @@ index e8fd2148..e55d572a 100644
ch.write( BungeeCord.getInstance().registerChannels( user.getPendingConnection().getVersion() ) );
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index aebfdc16..e245c3c0 100644
index e77804f8..51aed6da 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -72,6 +72,7 @@ public final class UserConnection implements ProxiedPlayer
@ -105,7 +105,7 @@ index aebfdc16..e245c3c0 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 0d7a6d83..ccebd15a 100644
index b15045f6..05e6b438 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

View File

@ -1,4 +1,4 @@
From ec5ec620f2bab5a9575390f4b12bd590d8f510b6 Mon Sep 17 00:00:00 2001
From 049625bef454fd6b564e95af81abc79eeb0252a7 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,10 +7,10 @@ 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 e55d572a..281adc8c 100644
index 031ea985..fbe4ffe2 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -416,6 +416,6 @@ public class ServerConnector extends PacketHandler
@@ -422,6 +422,6 @@ public class ServerConnector extends PacketHandler
@Override
public String toString()
{

View File

@ -1,4 +1,4 @@
From 5fe009487736a995b301341c2457453e3e0a81d9 Mon Sep 17 00:00:00 2001
From d44e2a7fcbcea35ab7e30ca7c9cb64abd75cfe1a 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,10 +62,10 @@ 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 281adc8c..dae9e294 100644
index fbe4ffe2..8b3ff379 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -339,7 +339,7 @@ public class ServerConnector extends PacketHandler
@@ -345,7 +345,7 @@ public class ServerConnector extends PacketHandler
public void handle(Kick kick) throws Exception
{
ServerInfo def = user.updateAndGetNextServer( target );

View File

@ -1,11 +1,11 @@
From cb58c49decf1797f281bf3beb8c773574af6f396 Mon Sep 17 00:00:00 2001
From c3b8811c3d1eba74e281a68ffca69f8abbd52e73 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
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java b/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java
index 39e257c3..e4f14974 100644
index ac31e435..252389bd 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java
@@ -7,6 +7,8 @@ import net.md_5.bungee.protocol.packet.ClientStatus;
@ -15,10 +15,10 @@ index 39e257c3..e4f14974 100644
+import net.md_5.bungee.protocol.packet.EntityEffect; // Waterfall
+import net.md_5.bungee.protocol.packet.EntityRemoveEffect; // Waterfall
import net.md_5.bungee.protocol.packet.EntityStatus;
import net.md_5.bungee.protocol.packet.GameState;
import net.md_5.bungee.protocol.packet.Handshake;
import net.md_5.bungee.protocol.packet.KeepAlive;
@@ -173,4 +175,14 @@ public abstract class AbstractPacketHandler
public void handle(ViewDistance viewDistance) throws Exception
@@ -178,4 +180,14 @@ public abstract class AbstractPacketHandler
public void handle(GameState gameState) throws Exception
{
}
+
@ -33,19 +33,19 @@ index 39e257c3..e4f14974 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 31cbaa53..3556eda0 100644
index 17f2bf4c..043e8562 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
@@ -16,6 +16,8 @@ import net.md_5.bungee.protocol.packet.Commands;
import net.md_5.bungee.protocol.packet.EncryptionRequest;
@@ -17,6 +17,8 @@ import net.md_5.bungee.protocol.packet.EncryptionRequest;
import net.md_5.bungee.protocol.packet.EncryptionResponse;
import net.md_5.bungee.protocol.packet.EntityStatus;
import net.md_5.bungee.protocol.packet.GameState;
+import net.md_5.bungee.protocol.packet.EntityEffect;
+import net.md_5.bungee.protocol.packet.EntityRemoveEffect;
import net.md_5.bungee.protocol.packet.Handshake;
import net.md_5.bungee.protocol.packet.KeepAlive;
import net.md_5.bungee.protocol.packet.Kick;
@@ -97,6 +99,29 @@ public enum Protocol
@@ -98,6 +100,29 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_9, 0x0C ),
map( ProtocolConstants.MINECRAFT_1_15, 0x0D )
);
@ -169,7 +169,7 @@ index 00000000..7ed2dc3a
+ }
+}
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index 3f9a91e3..a5da62f3 100644
index 3f55af3d..ee4ede23 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -1,7 +1,9 @@

View File

@ -1,14 +1,14 @@
From 2205994921a10600becdb405c2e06a1f8ec0c18b Mon Sep 17 00:00:00 2001
From abb3bcba4bb5e0e1cb9ce662880633b8a5aac8df Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 13:07:31 +0200
Subject: [PATCH] Handle plugin prefixes using Log4J
diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java b/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
index bc91208a..e85b4914 100644
index 2286a1ab..9660234d 100644
--- a/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
+++ b/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
@@ -85,7 +85,7 @@ public class Plugin
@@ -102,7 +102,7 @@ public class Plugin
this.proxy = proxy;
this.description = description;
this.file = description.getFile();
@ -45,5 +45,5 @@ index 93ce3b14..3b3525f0 100644
<TimeBasedTriggeringPolicy />
<OnStartupTriggeringPolicy />
--
2.24.0
2.25.0

View File

@ -1,4 +1,4 @@
From 0116c8f04967a0c811477029d574d2e55a5b9193 Mon Sep 17 00:00:00 2001
From 9e78801085e10772415bf79f9806161591071cde Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 13:15:09 +0200
Subject: [PATCH] Allow plugins to use SLF4J for logging
@ -21,18 +21,19 @@ index 15228459..705b7279 100644
</dependencies>
</project>
diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java b/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
index e85b4914..2e5ae4fb 100644
index 9660234d..3d1e9a3a 100644
--- a/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
+++ b/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
@@ -27,6 +27,12 @@ public class Plugin
@Getter
private Logger logger;
@@ -44,6 +44,13 @@ public class Plugin
// init( proxy, description );
}
+ // Waterfall start - Allow plugins to use SLF4J for logging
+ public org.slf4j.Logger getSLF4JLogger() {
+ return org.slf4j.LoggerFactory.getLogger(logger.getName());
+ }
+ // Waterfall end
+
+
/**
* Called when the plugin has just been loaded. Most of the proxy will not

View File

@ -1,4 +1,4 @@
From 12f921539a222e09cba84945585ac57c4227bc49 Mon Sep 17 00:00:00 2001
From 3d39aab76fcf606f04df1c1e9e500009a2426a87 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 26 Sep 2017 18:59:37 +0200
Subject: [PATCH] Add console command completion
@ -7,10 +7,10 @@ Register command completer for JLine to complete command names and
command arguments (if supported).
diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java
index 81eb3f8a..11abcbb7 100644
index e7cd8a27..70d3736b 100644
--- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java
+++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java
@@ -205,6 +205,41 @@ public class PluginManager
@@ -205,6 +205,41 @@ public final class PluginManager
return true;
}
@ -102,5 +102,5 @@ index 765d24bc..6cec0b5a 100644
}
--
2.24.1
2.25.0

View File

@ -1,4 +1,4 @@
From 41cc576d0b2d95be6c0bf22e989604e18725913a Mon Sep 17 00:00:00 2001
From 4b35a73e97e5397ad49ff7dc9f9618f0a897873c 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,10 +57,10 @@ 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 dae9e294..139c4f09 100644
index 8b3ff379..858b3ae6 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -227,7 +227,7 @@ public class ServerConnector extends PacketHandler
@@ -228,7 +228,7 @@ public class ServerConnector extends PacketHandler
ch.write( message );
}
@ -69,7 +69,7 @@ index dae9e294..139c4f09 100644
{
ch.write( user.getSettings() );
}
@@ -261,6 +261,7 @@ public class ServerConnector extends PacketHandler
@@ -262,6 +262,7 @@ public class ServerConnector extends PacketHandler
user.getTabListHandler().onServerChange();
Scoreboard serverScoreboard = user.getServerSentScoreboard();
@ -77,7 +77,7 @@ index dae9e294..139c4f09 100644
for ( Objective objective : serverScoreboard.getObjectives() )
{
user.unsafe().sendPacket( new ScoreboardObjective( objective.getName(), objective.getValue(), ScoreboardObjective.HealthDisplay.fromString( objective.getType() ), (byte) 1 ) );
@@ -273,6 +274,7 @@ public class ServerConnector extends PacketHandler
@@ -274,6 +275,7 @@ public class ServerConnector extends PacketHandler
{
user.unsafe().sendPacket( new net.md_5.bungee.protocol.packet.Team( team.getName() ) );
}
@ -85,8 +85,8 @@ index dae9e294..139c4f09 100644
serverScoreboard.clear();
for ( UUID bossbar : user.getSentBossBars() )
@@ -286,12 +288,33 @@ public class ServerConnector extends PacketHandler
user.unsafe().sendPacket( new EntityStatus( user.getClientEntityId(), login.isReducedDebugInfo() ? EntityStatus.DEBUG_INFO_REDUCED : EntityStatus.DEBUG_INFO_NORMAL ) );
@@ -292,12 +294,33 @@ public class ServerConnector extends PacketHandler
}
user.setDimensionChange( true );
- if ( login.getDimension() == user.getDimension() )
@ -121,7 +121,7 @@ index dae9e294..139c4f09 100644
if ( user.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_14 )
{
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index a5da62f3..95dbaefd 100644
index ee4ede23..7c129221 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -745,4 +745,10 @@ public final class UserConnection implements ProxiedPlayer

View File

@ -1,14 +1,14 @@
From 97b71e8a4e4b621ef8e6942231e3543a0245e2af Mon Sep 17 00:00:00 2001
From f14e28031815c62e4ac6db77d17646cfb24de55e 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 3556eda0..44dc34ff 100644
index 043e8562..aa1515f4 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
@@ -53,6 +53,7 @@ public enum Protocol
@@ -54,6 +54,7 @@ public enum Protocol
{
TO_SERVER.registerPacket(
Handshake.class,
@ -16,7 +16,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x00 )
);
}
@@ -64,6 +65,7 @@ public enum Protocol
@@ -65,6 +66,7 @@ public enum Protocol
{
TO_CLIENT.registerPacket(
KeepAlive.class,
@ -24,7 +24,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x00 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x1F ),
map( ProtocolConstants.MINECRAFT_1_13, 0x21 ),
@@ -72,6 +74,7 @@ public enum Protocol
@@ -73,6 +75,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
Login.class,
@ -32,7 +32,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x01 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x23 ),
map( ProtocolConstants.MINECRAFT_1_13, 0x25 ),
@@ -79,6 +82,7 @@ public enum Protocol
@@ -80,6 +83,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
Chat.class,
@ -40,7 +40,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x02 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x0F ),
map( ProtocolConstants.MINECRAFT_1_13, 0x0E ),
@@ -86,6 +90,7 @@ public enum Protocol
@@ -87,6 +91,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
Respawn.class,
@ -48,7 +48,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x07 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x33 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x34 ),
@@ -96,12 +101,14 @@ public enum Protocol
@@ -97,12 +102,14 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
BossBar.class,
@ -63,7 +63,7 @@ index 3556eda0..44dc34ff 100644
map(ProtocolConstants.MINECRAFT_1_8, 0x1D),
map(ProtocolConstants.MINECRAFT_1_9, 0x4C),
map(ProtocolConstants.MINECRAFT_1_9_4, 0x4B),
@@ -113,6 +120,7 @@ public enum Protocol
@@ -114,6 +121,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
EntityRemoveEffect.class,
@ -71,7 +71,7 @@ index 3556eda0..44dc34ff 100644
map(ProtocolConstants.MINECRAFT_1_8, 0x1E),
map(ProtocolConstants.MINECRAFT_1_9, 0x31),
map(ProtocolConstants.MINECRAFT_1_12, 0x32),
@@ -124,6 +132,7 @@ public enum Protocol
@@ -125,6 +133,7 @@ public enum Protocol
// Waterfall end
TO_CLIENT.registerPacket(
PlayerListItem.class, // PlayerInfo
@ -79,7 +79,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x38 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x2D ),
map( ProtocolConstants.MINECRAFT_1_12_1, 0x2E ),
@@ -133,6 +142,7 @@ public enum Protocol
@@ -134,6 +143,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
TabCompleteResponse.class,
@ -87,7 +87,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x3A ),
map( ProtocolConstants.MINECRAFT_1_9, 0x0E ),
map( ProtocolConstants.MINECRAFT_1_13, 0x10 ),
@@ -140,6 +150,7 @@ public enum Protocol
@@ -141,6 +151,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
ScoreboardObjective.class,
@ -95,7 +95,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x3B ),
map( ProtocolConstants.MINECRAFT_1_9, 0x3F ),
map( ProtocolConstants.MINECRAFT_1_12, 0x41 ),
@@ -150,6 +161,7 @@ public enum Protocol
@@ -151,6 +162,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
ScoreboardScore.class,
@ -103,7 +103,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x3C ),
map( ProtocolConstants.MINECRAFT_1_9, 0x42 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x44 ),
@@ -160,6 +172,7 @@ public enum Protocol
@@ -161,6 +173,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
ScoreboardDisplay.class,
@ -111,7 +111,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x3D ),
map( ProtocolConstants.MINECRAFT_1_9, 0x38 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x3A ),
@@ -170,6 +183,7 @@ public enum Protocol
@@ -171,6 +184,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
Team.class,
@ -119,7 +119,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x3E ),
map( ProtocolConstants.MINECRAFT_1_9, 0x41 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x43 ),
@@ -180,6 +194,7 @@ public enum Protocol
@@ -181,6 +195,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
PluginMessage.class,
@ -127,7 +127,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x3F ),
map( ProtocolConstants.MINECRAFT_1_9, 0x18 ),
map( ProtocolConstants.MINECRAFT_1_13, 0x19 ),
@@ -188,6 +203,7 @@ public enum Protocol
@@ -189,6 +204,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
Kick.class,
@ -135,7 +135,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x40 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x1A ),
map( ProtocolConstants.MINECRAFT_1_13, 0x1B ),
@@ -196,6 +212,7 @@ public enum Protocol
@@ -197,6 +213,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
Title.class,
@ -143,7 +143,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x45 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_12_1, 0x48 ),
@@ -205,6 +222,7 @@ public enum Protocol
@@ -206,6 +223,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
PlayerListHeaderFooter.class,
@ -151,7 +151,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x48 ),
map( ProtocolConstants.MINECRAFT_1_9_4, 0x47 ),
@@ -216,6 +234,7 @@ public enum Protocol
@@ -217,6 +235,7 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
EntityStatus.class,
@ -159,7 +159,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x1A ),
map( ProtocolConstants.MINECRAFT_1_9, 0x1B ),
map( ProtocolConstants.MINECRAFT_1_13, 0x1C ),
@@ -224,17 +243,20 @@ public enum Protocol
@@ -225,21 +244,25 @@ public enum Protocol
);
TO_CLIENT.registerPacket(
Commands.class,
@ -167,6 +167,11 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_13, 0x11 ),
map( ProtocolConstants.MINECRAFT_1_15, 0x12 )
);
TO_CLIENT.registerPacket(
GameState.class,
+ GameState::new, // Waterfall - speed up packet construction
map( ProtocolConstants.MINECRAFT_1_15, 0x1F )
);
TO_CLIENT.registerPacket(
ViewDistance.class,
+ ViewDistance::new, // Waterfall - speed up packet construction
@ -180,7 +185,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x00 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x0B ),
map( ProtocolConstants.MINECRAFT_1_12, 0x0C ),
@@ -244,6 +266,7 @@ public enum Protocol
@@ -249,6 +272,7 @@ public enum Protocol
);
TO_SERVER.registerPacket(
Chat.class,
@ -188,7 +193,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x01 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x02 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x03 ),
@@ -252,6 +275,7 @@ public enum Protocol
@@ -257,6 +281,7 @@ public enum Protocol
);
TO_SERVER.registerPacket(
TabCompleteRequest.class,
@ -196,7 +201,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x14 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x01 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x02 ),
@@ -261,6 +285,7 @@ public enum Protocol
@@ -266,6 +291,7 @@ public enum Protocol
);
TO_SERVER.registerPacket(
ClientSettings.class,
@ -204,7 +209,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x15 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x04 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x05 ),
@@ -269,6 +294,7 @@ public enum Protocol
@@ -274,6 +300,7 @@ public enum Protocol
);
TO_SERVER.registerPacket(
PluginMessage.class,
@ -212,7 +217,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x17 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x09 ),
map( ProtocolConstants.MINECRAFT_1_12, 0x0A ),
@@ -285,19 +311,23 @@ public enum Protocol
@@ -290,19 +317,23 @@ public enum Protocol
{
TO_CLIENT.registerPacket(
StatusResponse.class,
@ -236,7 +241,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_8, 0x01 )
);
}
@@ -309,35 +339,43 @@ public enum Protocol
@@ -314,35 +345,43 @@ public enum Protocol
{
TO_CLIENT.registerPacket(
Kick.class,
@ -280,7 +285,7 @@ index 3556eda0..44dc34ff 100644
map( ProtocolConstants.MINECRAFT_1_13, 0x02 )
);
}
@@ -388,7 +426,7 @@ public enum Protocol
@@ -393,7 +432,7 @@ public enum Protocol
private final int protocolVersion;
private final TObjectIntMap<Class<? extends DefinedPacket>> packetMap = new TObjectIntHashMap<>( MAX_PACKET_ID );
@ -289,7 +294,7 @@ index 3556eda0..44dc34ff 100644
}
@Data
@@ -456,21 +494,24 @@ public enum Protocol
@@ -461,21 +500,24 @@ public enum Protocol
throw new BadPacketException( "Packet with id " + id + " outside of range " );
}
@ -318,7 +323,7 @@ index 3556eda0..44dc34ff 100644
int mappingIndex = 0;
ProtocolMapping mapping = mappings[mappingIndex];
@@ -499,11 +540,32 @@ public enum Protocol
@@ -504,11 +546,32 @@ public enum Protocol
data.packetMap.put( packetClass, mapping.packetID );
data.packetConstructors[mapping.packetID] = constructor;
}