mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-02-14 02:41:38 +01:00
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Do note that OSX natives are now compiled for Apple Silicon, Long Live ARM BungeeCord Changes: 6f70b15e Minecraft 1.20.5 support b30499e2 #3667: Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.0 to 3.4.1 5079181c Minecraft 1.20.5-rc3 support ee02d98c Minecraft 1.20.5-rc2 support c7ff3b8a #3654: Update year in README.md de60af0d #3659: Cleanup command packets for 1.20.5 a9218a7a #3660: Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.3 to 3.2.4 67c65e04 #3658: Minecraft 1.20.5-rc1 support 1be25b6c #3656: Improve online mode support where IP forwarding is disabled 8525b449 Minecraft 1.20.5-pre3 support 1fca510a #3655: Fix 1.20.5-pre1 view distance packet ID 33841852 #3652: Bump org.apache.maven.plugins:maven-jar-plugin from 3.3.0 to 3.4.0 3075d2c1 #3651: Bump io.netty:netty-bom from 4.1.108.Final to 4.1.109.Final bc528d5d Update native libraries 25cf8d68 #3617: Don't go further if connection is disconnected during handshake event 17e23d5c #3628: Convert PostLoginEvent to AsyncEvent and expose target server d6c5197c #3599: Bump com.mysql:mysql-connector-j from 8.2.0 to 8.3.0 dd96f0f8 #3647: Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.2 to 3.2.3 8a9501ff Minecraft 1.20.5-pre1 support
39 lines
1.7 KiB
Diff
39 lines
1.7 KiB
Diff
From f9ca58d3ac570d6f371413fbb3536c881480418e Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sun, 12 Jun 2022 06:45:54 +0100
|
|
Subject: [PATCH] Add protocol version to packet not found message
|
|
|
|
Also avoids a double get, but, this is probably trivial
|
|
|
|
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 d932b696..7a29eb0d 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
|
|
@@ -2,6 +2,8 @@ package net.md_5.bungee.protocol;
|
|
|
|
import com.google.common.base.Preconditions;
|
|
import com.google.common.collect.Iterables;
|
|
+
|
|
+import gnu.trove.impl.Constants;
|
|
import gnu.trove.map.TIntObjectMap;
|
|
import gnu.trove.map.TObjectIntMap;
|
|
import gnu.trove.map.hash.TIntObjectHashMap;
|
|
@@ -943,9 +945,12 @@ public enum Protocol
|
|
{
|
|
throw new BadPacketException( "Unsupported protocol version" );
|
|
}
|
|
- Preconditions.checkArgument( protocolData.packetMap.containsKey( packet ), "Cannot get ID for packet %s in phase %s with direction %s", packet, protocolPhase, direction );
|
|
+ // Waterfall start
|
|
+ final int packetId = protocolData.packetMap.get(packet);
|
|
+ Preconditions.checkArgument( packetId >= 0, "Cannot get ID for packet %s in phase %s with direction %s for protocol version %s", packet, protocolPhase, direction, version ); // Waterfall - add version
|
|
|
|
- return protocolData.packetMap.get( packet );
|
|
+ return packetId;
|
|
+ // Waterfall end
|
|
}
|
|
}
|
|
}
|
|
--
|
|
2.44.0
|
|
|