mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-02-15 03:11:45 +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 BungeeCord Changes: e642b9dd Minecraft 24w13a support db623d10 #3640: Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.1 to 3.2.2 61bb9f5b #3637: Bump org.projectlombok:lombok from 1.18.30 to 1.18.32 9551b453 #3639: Bump io.netty:netty-bom from 4.1.107.Final to 4.1.108.Final dc680b87 #3636: Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.1 156eda78 #3635: Bump org.apache.maven.plugins:maven-compiler-plugin 31be68af Minecraft 24w12a support ffa011c7 #3622: Revert "#3256: Allow - and . in online mode as some accounts still have these…" 22536c11 #3618: Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.1 to 3.5.2 2394e204 #3629: Fix scoreboard team data reading 1b88a847 Minecraft 24w10a support
39 lines
1.7 KiB
Diff
39 lines
1.7 KiB
Diff
From a19eb650fe93a822c0387553200ca16fa1c6643d 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 a8a91955..414d4578 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;
|
|
@@ -942,9 +944,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
|
|
|