Updated Upstream (BungeeCord)

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:
5a1e342e Minecraft 1.20.2 support
d9bbdc32 Add Java 21 compilation support
cfe00fa4 #3490: Add ComponentBuilder#build() and ComponentSerializer#deserialize()
d68ebd1e Minecraft 1.20.2-rc1 support
a7cd79eb #3516: Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0
9e83ee6f #3508: Use same compression threshold checks as Vanilla
7c81d917 #3513: Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.4.0 to 3.4.1
5b126b7f Fix javadoc plugin version in non-dist builds
9fe7d21f #3510: Bump actions/checkout from 3 to 4
94ea0271 #3505: Bump io.netty:netty-bom from 4.1.96.Final to 4.1.97.Final
3af672d2 #3504: Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.3.0 to 3.4.0
0dd7b984 Bump version to 1.20-R0.2-SNAPSHOT
a793692a Release 1.20-R0.1
23fb8382 #3493: Bump io.netty:netty-bom from 4.1.95.Final to 4.1.96.Final
2d6d89d6 #3492: Bump io.netty:netty-bom from 4.1.94.Final to 4.1.95.Final
0199cb90 #3489: Add command string length limit when decoding ClientCommand
958cef50 #3488: Bump scriptus from 0.4.1 to 0.5.0
9f5ace90 #3418: Add tab completion for bungee command names in pre-1.13 versions
3a6e2631 #3479: Bump netty-bom from 4.1.93.Final to 4.1.94.Final
c7adcf9f Disable maven enforcer for now
da3616e6 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends
b371fe67 #3478: Bump maven-shade-plugin from 3.4.1 to 3.5.0
6324c7d5 #3401: Only synchronize necessary parts of the BungeeServerInfo#sendData method
6263fe28 #3426: Made find command output hover and clickable
9a7617f9 #3475: Add KickPlayerRaw channel
9a71358d #3439: Add GetPlayerServer bungee plugin message subchannel
a96a2e80 #3437: Remove unused enum in ServerConnector and add color to exception message
This commit is contained in:
Shane Freeder 2023-09-21 17:59:49 +01:00
parent 7800e6fb9f
commit 77a8bd1767
16 changed files with 53 additions and 213 deletions

@ -1 +1 @@
Subproject commit d9bbdc3281ab6f9a3f6383febc75f0279d8d7c02 Subproject commit 5a1e342e0d500bfbab77dcfda24273e971a28b02

View File

@ -1,14 +1,14 @@
From adedd18803ccda77f946628374b537f459b16010 Mon Sep 17 00:00:00 2001 From d86bb6401198008a6cc41ab73ebd1f253322ff7c Mon Sep 17 00:00:00 2001
From: Troy Frew <fuzzy_bot@arenaga.me> From: Troy Frew <fuzzy_bot@arenaga.me>
Date: Tue, 15 Nov 2016 09:07:51 -0500 Date: Tue, 15 Nov 2016 09:07:51 -0500
Subject: [PATCH] Fixup ProtocolConstants 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 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 46311941..3800141e 100644 index 7d5e2635..a0dd9be6 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java --- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
@@ -113,6 +113,16 @@ public class ProtocolConstants @@ -114,6 +114,16 @@ public class ProtocolConstants
SUPPORTED_VERSION_IDS = supportedVersionIds.build(); SUPPORTED_VERSION_IDS = supportedVersionIds.build();
} }

View File

@ -1,4 +1,4 @@
From 88fb3abe3ca17082bc542226a1f52df63517cf67 Mon Sep 17 00:00:00 2001 From f2b7723b3a39d08901799d3205d6aa93e70f89b3 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net> From: Techcable <Techcable@techcable.net>
Date: Thu, 19 May 2016 17:09:22 -0600 Date: Thu, 19 May 2016 17:09:22 -0600
Subject: [PATCH] Allow invalid packet ids for forge servers Subject: [PATCH] Allow invalid packet ids for forge servers
@ -92,18 +92,6 @@ index 7c3e9a29..56e500a1 100644
bungee.getPluginManager().callEvent( event ); bungee.getPluginManager().callEvent( event );
ch.write( BungeeCord.getInstance().registerChannels( user.getPendingConnection().getVersion() ) ); 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 65e942cd..e37d502b 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -74,6 +74,7 @@ public final class UserConnection implements ProxiedPlayer
private final ProxyServer bungee;
@Getter
@NonNull
+ @Getter
private final ChannelWrapper ch;
@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 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 30cc36a4..c033118f 100644 index 30cc36a4..c033118f 100644
--- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java

View File

@ -1,4 +1,4 @@
From b624f9224f0de6b440be2830fcf51b2e8cb21c30 Mon Sep 17 00:00:00 2001 From 964bf7b3cf1b45a82b8ab24689bed4cbd549b968 Mon Sep 17 00:00:00 2001
From: Ichbinjoe <joe@ibj.io> From: Ichbinjoe <joe@ibj.io>
Date: Sat, 16 Jul 2016 20:44:01 -0400 Date: Sat, 16 Jul 2016 20:44:01 -0400
Subject: [PATCH] Add timeout variant to connect methods Subject: [PATCH] Add timeout variant to connect methods
@ -75,10 +75,10 @@ index c3848b3c..a441a424 100644
* Connects / transfers this user to the specified connection, gracefully * Connects / transfers this user to the specified connection, gracefully
* closing the current one. Depending on the implementation, this method * closing the current one. Depending on the implementation, this method
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java 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 e37d502b..07cfe1d5 100644 index 65e942cd..87eb9199 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -259,9 +259,20 @@ public final class UserConnection implements ProxiedPlayer @@ -258,9 +258,20 @@ public final class UserConnection implements ProxiedPlayer
public void connect(ServerInfo info, final Callback<Boolean> callback, final boolean retry, ServerConnectEvent.Reason reason) public void connect(ServerInfo info, final Callback<Boolean> callback, final boolean retry, ServerConnectEvent.Reason reason)
{ {
@ -99,7 +99,7 @@ index e37d502b..07cfe1d5 100644
if ( callback != null ) if ( callback != null )
{ {
// Convert the Callback<Boolean> to be compatible with Callback<Result> from ServerConnectRequest. // Convert the Callback<Boolean> to be compatible with Callback<Result> from ServerConnectRequest.
@@ -355,7 +366,7 @@ public final class UserConnection implements ProxiedPlayer @@ -354,7 +365,7 @@ public final class UserConnection implements ProxiedPlayer
if ( request.isRetry() && def != null && ( getServer() == null || def != getServer().getInfo() ) ) if ( request.isRetry() && def != null && ( getServer() == null || def != getServer().getInfo() ) )
{ {
sendMessage( bungee.getTranslation( "fallback_lobby" ) ); sendMessage( bungee.getTranslation( "fallback_lobby" ) );

View File

@ -1,4 +1,4 @@
From ce79efbdf45d665fd0f018cae81294db0245c262 Mon Sep 17 00:00:00 2001 From 42716f7bfd1552c1a7207293614d27d8105833d1 Mon Sep 17 00:00:00 2001
From: Aaron Hill <aa1ronham@gmail.com> From: Aaron Hill <aa1ronham@gmail.com>
Date: Thu, 15 Sep 2016 22:38:37 +0200 Date: Thu, 15 Sep 2016 22:38:37 +0200
Subject: [PATCH] Fix potion race condition on Forge 1.8.9 Subject: [PATCH] Fix potion race condition on Forge 1.8.9
@ -117,7 +117,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 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 07cfe1d5..c74e44b5 100644 index 87eb9199..a129dc42 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/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 @@ @@ -1,7 +1,9 @@
@ -130,8 +130,19 @@ index 07cfe1d5..c74e44b5 100644
import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFuture;
@@ -125,6 +127,10 @@ public final class UserConnection implements ProxiedPlayer
private final Scoreboard serverSentScoreboard = new Scoreboard();
@Getter
private final Collection<UUID> sentBossBars = new HashSet<>();
+ // Waterfall start
+ @Getter
+ private final Multimap<Integer, Integer> potions = HashMultimap.create();
+ // Waterfall end
@Getter
@Setter
private String lastCommandTabbed;
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 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 30fbb0b1..102eb1a8 100644 index 30fbb0b1..c412bbab 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
@@ -737,6 +737,32 @@ public class DownstreamBridge extends PacketHandler @@ -737,6 +737,32 @@ public class DownstreamBridge extends PacketHandler
@ -140,7 +151,7 @@ index 30fbb0b1..102eb1a8 100644
+ // Waterfall start + // Waterfall start
+ @Override + @Override
+ public void handle(EntityEffect entityEffect) throws Exception + public void handle(net.md_5.bungee.protocol.packet.EntityEffect entityEffect) throws Exception
+ { + {
+ // Don't send any potions when switching between servers (which involves a handshake), which can trigger a race + // Don't send any potions when switching between servers (which involves a handshake), which can trigger a race
+ // condition on the client. + // condition on the client.
@ -151,7 +162,7 @@ index 30fbb0b1..102eb1a8 100644
+ } + }
+ +
+ @Override + @Override
+ public void handle(EntityRemoveEffect removeEffect) throws Exception + public void handle(net.md_5.bungee.protocol.packet.EntityRemoveEffect removeEffect) throws Exception
+ { + {
+ con.getPotions().remove(rewriteEntityId(removeEffect.getEntityId()), removeEffect.getEffectId()); + con.getPotions().remove(rewriteEntityId(removeEffect.getEntityId()), removeEffect.getEffectId());
+ } + }

View File

@ -1,4 +1,4 @@
From f0bc70621c1957e310e814708854a5674129f7aa Mon Sep 17 00:00:00 2001 From ceefeced5e361ab808abd4831ce7ff9d45026855 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net> From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 12:46:47 +0200 Date: Fri, 22 Sep 2017 12:46:47 +0200
Subject: [PATCH] Use Log4j2 for logging and TerminalConsoleAppender for Subject: [PATCH] Use Log4j2 for logging and TerminalConsoleAppender for
@ -39,7 +39,7 @@ index 07d49112..672a813d 100644
</build> </build>
diff --git a/log4j/pom.xml b/log4j/pom.xml diff --git a/log4j/pom.xml b/log4j/pom.xml
new file mode 100644 new file mode 100644
index 00000000..1cc7936e index 00000000..f9a169cc
--- /dev/null --- /dev/null
+++ b/log4j/pom.xml +++ b/log4j/pom.xml
@@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
@ -50,13 +50,13 @@ index 00000000..1cc7936e
+ <parent> + <parent>
+ <groupId>io.github.waterfallmc</groupId> + <groupId>io.github.waterfallmc</groupId>
+ <artifactId>waterfall-parent</artifactId> + <artifactId>waterfall-parent</artifactId>
+ <version>1.20-R0.1-SNAPSHOT</version> + <version>1.20-R0.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath> + <relativePath>../pom.xml</relativePath>
+ </parent> + </parent>
+ +
+ <groupId>io.github.waterfallmc</groupId> + <groupId>io.github.waterfallmc</groupId>
+ <artifactId>waterfall-log4j</artifactId> + <artifactId>waterfall-log4j</artifactId>
+ <version>1.20-R0.1-SNAPSHOT</version> + <version>1.20-R0.2-SNAPSHOT</version>
+ <packaging>jar</packaging> + <packaging>jar</packaging>
+ +
+ <name>Waterfall-Log4J</name> + <name>Waterfall-Log4J</name>

View File

@ -1,4 +1,4 @@
From 3be2c70b1860141a74772aa85bdbfb6c91b7d1f2 Mon Sep 17 00:00:00 2001 From 8525fdb1e67b91ffd9d11342c505ecf351a29619 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 14 Jan 2019 03:35:21 +0000 Date: Mon, 14 Jan 2019 03:35:21 +0000
Subject: [PATCH] Provide an option to disable entity metadata rewriting 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 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 2624dd37..c3268cbe 100644 index 2624dd37..55218447 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java --- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -255,7 +255,7 @@ public class ServerConnector extends PacketHandler @@ -255,7 +255,7 @@ public class ServerConnector extends PacketHandler
@ -85,7 +85,7 @@ index 2624dd37..c3268cbe 100644
serverScoreboard.clear(); serverScoreboard.clear();
for ( UUID bossbar : user.getSentBossBars() ) for ( UUID bossbar : user.getSentBossBars() )
@@ -340,13 +342,33 @@ public class ServerConnector extends PacketHandler @@ -340,13 +342,34 @@ public class ServerConnector extends PacketHandler
} }
user.setDimensionChange( true ); user.setDimensionChange( true );
@ -105,15 +105,16 @@ index 2624dd37..c3268cbe 100644
+ // Only send if we are not in the same dimension + // Only send if we are not in the same dimension
+ if ( login.getDimension() != user.getDimension() ) // Waterfall - defer + if ( login.getDimension() != user.getDimension() ) // Waterfall - defer
+ { + {
+ 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.getDeathLocation(), login.getPortalCooldown() ) ); + 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(), (byte) 0, login.getDeathLocation(), login.getPortalCooldown() ) );
+ } + }
+ Login modLogin = new Login( login.getEntityId(), login.isHardcore(), 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.getSimulationDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat(), login.getDeathLocation(), login.getPortalCooldown() ); + (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.getSimulationDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isLimitedCrafting(), login.isDebug(), login.isFlat(), login.getDeathLocation(),
+ login.getPortalCooldown() );
+ user.unsafe().sendPacket(modLogin); + user.unsafe().sendPacket(modLogin);
+ // Only send if we're in the same dimension + // Only send if we're in the same dimension
+ if ( login.getDimension() == user.getDimension() ) // Waterfall - defer + if ( login.getDimension() == user.getDimension() ) // Waterfall - defer
+ { + {
+ user.unsafe().sendPacket( new Respawn( (Integer) login.getDimension() >= 0 ? -1 : 0, login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), false, login.getDeathLocation(), login.getPortalCooldown() ) ); + user.unsafe().sendPacket( new Respawn( (Integer) login.getDimension() >= 0 ? -1 : 0, login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), (byte) 0, login.getDeathLocation(), login.getPortalCooldown() ) );
+ } + }
+ } + }
+ // Waterfall end + // Waterfall end
@ -121,10 +122,10 @@ index 2624dd37..c3268cbe 100644
(byte) 0, login.getDeathLocation(), login.getPortalCooldown() ) ); (byte) 0, login.getDeathLocation(), login.getPortalCooldown() ) );
if ( user.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_14 ) 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 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 c74e44b5..9e933b1d 100644 index a129dc42..fe6eab9b 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -775,4 +775,10 @@ public final class UserConnection implements ProxiedPlayer @@ -778,4 +778,10 @@ public final class UserConnection implements ProxiedPlayer
{ {
return serverSentScoreboard; return serverSentScoreboard;
} }
@ -136,12 +137,12 @@ index c74e44b5..9e933b1d 100644
+ // Waterfall end + // 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 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 102eb1a8..a2995c60 100644 index c412bbab..5966469b 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
@@ -741,6 +741,7 @@ public class DownstreamBridge extends PacketHandler @@ -741,6 +741,7 @@ public class DownstreamBridge extends PacketHandler
@Override @Override
public void handle(EntityEffect entityEffect) throws Exception public void handle(net.md_5.bungee.protocol.packet.EntityEffect entityEffect) throws Exception
{ {
+ if (con.isDisableEntityMetadataRewrite()) return; // Waterfall + if (con.isDisableEntityMetadataRewrite()) return; // Waterfall
// Don't send any potions when switching between servers (which involves a handshake), which can trigger a race // Don't send any potions when switching between servers (which involves a handshake), which can trigger a race
@ -149,7 +150,7 @@ index 102eb1a8..a2995c60 100644
if (this.con.getForgeClientHandler().isForgeUser() && !this.con.getForgeClientHandler().isHandshakeComplete()) { if (this.con.getForgeClientHandler().isForgeUser() && !this.con.getForgeClientHandler().isHandshakeComplete()) {
@@ -752,6 +753,7 @@ public class DownstreamBridge extends PacketHandler @@ -752,6 +753,7 @@ public class DownstreamBridge extends PacketHandler
@Override @Override
public void handle(EntityRemoveEffect removeEffect) throws Exception public void handle(net.md_5.bungee.protocol.packet.EntityRemoveEffect removeEffect) throws Exception
{ {
+ if (con.isDisableEntityMetadataRewrite()) return; // Waterfall + if (con.isDisableEntityMetadataRewrite()) return; // Waterfall
con.getPotions().remove(rewriteEntityId(removeEffect.getEntityId()), removeEffect.getEffectId()); con.getPotions().remove(rewriteEntityId(removeEffect.getEntityId()), removeEffect.getEffectId());

View File

@ -1,4 +1,4 @@
From f5ddca96ef3353bc21ba8b63b1be12437c0e8424 Mon Sep 17 00:00:00 2001 From cf604e1b03d62a3c0914712ed056c9fb538c3de0 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 16 Apr 2021 06:29:28 +0100 Date: Fri, 16 Apr 2021 06:29:28 +0100
Subject: [PATCH] ServerConnectRequest#sendFeedback Subject: [PATCH] ServerConnectRequest#sendFeedback
@ -31,10 +31,10 @@ index c81b0a4e..d21370be 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 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 9e933b1d..1a7fa00e 100644 index fe6eab9b..fc8df2b8 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -268,12 +268,16 @@ public final class UserConnection implements ProxiedPlayer @@ -271,12 +271,16 @@ public final class UserConnection implements ProxiedPlayer
connect(info, callback, retry, ServerConnectEvent.Reason.PLUGIN, timeout); connect(info, callback, retry, ServerConnectEvent.Reason.PLUGIN, timeout);
} }
@ -53,7 +53,7 @@ index 9e933b1d..1a7fa00e 100644
builder.connectTimeout(timeout); // Waterfall builder.connectTimeout(timeout); // Waterfall
if ( callback != null ) if ( callback != null )
{ {
@@ -321,7 +325,7 @@ public final class UserConnection implements ProxiedPlayer @@ -324,7 +328,7 @@ public final class UserConnection implements ProxiedPlayer
callback.done( ServerConnectRequest.Result.ALREADY_CONNECTED, null ); callback.done( ServerConnectRequest.Result.ALREADY_CONNECTED, null );
} }
@ -62,7 +62,7 @@ index 9e933b1d..1a7fa00e 100644
return; return;
} }
if ( pendingConnects.contains( target ) ) if ( pendingConnects.contains( target ) )
@@ -331,7 +335,7 @@ public final class UserConnection implements ProxiedPlayer @@ -334,7 +338,7 @@ public final class UserConnection implements ProxiedPlayer
callback.done( ServerConnectRequest.Result.ALREADY_CONNECTING, null ); callback.done( ServerConnectRequest.Result.ALREADY_CONNECTING, null );
} }
@ -71,7 +71,7 @@ index 9e933b1d..1a7fa00e 100644
return; return;
} }
@@ -367,14 +371,14 @@ public final class UserConnection implements ProxiedPlayer @@ -370,14 +374,14 @@ public final class UserConnection implements ProxiedPlayer
ServerInfo def = updateAndGetNextServer( target ); ServerInfo def = updateAndGetNextServer( target );
if ( request.isRetry() && def != null && ( getServer() == null || def != getServer().getInfo() ) ) if ( request.isRetry() && def != null && ( getServer() == null || def != getServer().getInfo() ) )
{ {

View File

@ -1,4 +1,4 @@
From 49d8d065ef2a1f7a7b885b204ba6676a8f2c826e Mon Sep 17 00:00:00 2001 From e1c30dc6d176143f1f51a9e48636125f45ecb957 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 22 Mar 2022 14:56:44 +0000 Date: Tue, 22 Mar 2022 14:56:44 +0000
Subject: [PATCH] Don't send exceptions to the client during kicks, etc Subject: [PATCH] Don't send exceptions to the client during kicks, etc
@ -13,10 +13,10 @@ allows for retaining much of the overall context here, i.e. who
was this exception assocated with? was this exception assocated with?
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java 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 1a7fa00e..5c4d7e54 100644 index fc8df2b8..fb08c080 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -399,7 +399,8 @@ public final class UserConnection implements ProxiedPlayer @@ -402,7 +402,8 @@ public final class UserConnection implements ProxiedPlayer
private String connectionFailMessage(Throwable cause) private String connectionFailMessage(Throwable cause)
{ {

View File

@ -1,4 +1,4 @@
From 30382255e40088804060b9e07047a89d149ef381 Mon Sep 17 00:00:00 2001 From 1dc384718469865083289a3c4239082c5a68f9ce Mon Sep 17 00:00:00 2001
From: Janmm14 <gitconfig1@janmm14.de> From: Janmm14 <gitconfig1@janmm14.de>
Date: Mon, 21 Jun 2021 23:43:39 +0200 Date: Mon, 21 Jun 2021 23:43:39 +0200
Subject: [PATCH] Replace reflection inside netty with ChannelFactory. Subject: [PATCH] Replace reflection inside netty with ChannelFactory.
@ -32,10 +32,10 @@ index 377df7ec..8f531f85 100644
.handler( PipelineUtils.BASE_SERVERSIDE ) .handler( PipelineUtils.BASE_SERVERSIDE )
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, BungeeCord.getInstance().getConfig().getRemotePingTimeout() ) .option( ChannelOption.CONNECT_TIMEOUT_MILLIS, BungeeCord.getInstance().getConfig().getRemotePingTimeout() )
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java 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 5c4d7e54..7d3f079f 100644 index fb08c080..96f4d017 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -384,7 +384,7 @@ public final class UserConnection implements ProxiedPlayer @@ -387,7 +387,7 @@ public final class UserConnection implements ProxiedPlayer
} }
}; };
Bootstrap b = new Bootstrap() Bootstrap b = new Bootstrap()

View File

@ -1,30 +0,0 @@
From 1665cd2d7da859434abba8d8fd5e7370c98b9150 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 21 Sep 2023 10:51:51 +0100
Subject: [PATCH] fixup! Use Log4j2 for logging and TerminalConsoleAppender for
console
diff --git a/log4j/pom.xml b/log4j/pom.xml
index e83b2f21..6d20191e 100644
--- a/log4j/pom.xml
+++ b/log4j/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>io.github.waterfallmc</groupId>
<artifactId>waterfall-parent</artifactId>
- <version>1.20-R0.1-SNAPSHOT</version>
+ <version>1.20-R0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>io.github.waterfallmc</groupId>
<artifactId>waterfall-log4j</artifactId>
- <version>1.20-R0.1-SNAPSHOT</version>
+ <version>1.20-R0.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Waterfall-Log4J</name>
--
2.42.0

View File

@ -1,21 +0,0 @@
From 9dc8d90d5610ef148ac47df05d173ae3d749950e Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 21 Sep 2023 10:54:16 +0100
Subject: [PATCH] fixup! Allow invalid packet ids for forge servers
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 7d3f079f..4936001c 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -76,7 +76,6 @@ public final class UserConnection implements ProxiedPlayer
private final ProxyServer bungee;
@Getter
@NonNull
- @Getter
private final ChannelWrapper ch;
@Getter
@NonNull
--
2.42.0

View File

@ -1,31 +0,0 @@
From 658a0d875f9b5dd28a442ae83e42db2cb9456da6 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 21 Sep 2023 11:02:43 +0100
Subject: [PATCH] fixup! Fix potion race condition on Forge 1.8.9
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 485af04f..76acae0e 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
@@ -745,7 +745,7 @@ public class DownstreamBridge extends PacketHandler
// Waterfall start
@Override
- public void handle(EntityEffect entityEffect) throws Exception
+ public void handle(net.md_5.bungee.protocol.packet.EntityEffect entityEffect) throws Exception
{
if (con.isDisableEntityMetadataRewrite()) return; // Waterfall
// Don't send any potions when switching between servers (which involves a handshake), which can trigger a race
@@ -757,7 +757,7 @@ public class DownstreamBridge extends PacketHandler
}
@Override
- public void handle(EntityRemoveEffect removeEffect) throws Exception
+ public void handle(net.md_5.bungee.protocol.packet.EntityRemoveEffect removeEffect) throws Exception
{
if (con.isDisableEntityMetadataRewrite()) return; // Waterfall
con.getPotions().remove(rewriteEntityId(removeEffect.getEntityId()), removeEffect.getEffectId());
--
2.42.0

View File

@ -1,24 +0,0 @@
From 68aa24164c2487820bc4e4dcb14117f62e04c775 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 21 Sep 2023 11:04:15 +0100
Subject: [PATCH] fixup! Fix potion race condition on Forge 1.8.9
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 4936001c..96f4d017 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -127,6 +127,10 @@ public final class UserConnection implements ProxiedPlayer
private final Scoreboard serverSentScoreboard = new Scoreboard();
@Getter
private final Collection<UUID> sentBossBars = new HashSet<>();
+ // Waterfall start
+ @Getter
+ private final Multimap<Integer, Integer> potions = HashMultimap.create();
+ // Waterfall end
@Getter
@Setter
private String lastCommandTabbed;
--
2.42.0

View File

@ -1,23 +0,0 @@
From 664f46a96cc150e5c1790404ce6f3dce361d355f Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 21 Sep 2023 11:17:49 +0100
Subject: [PATCH] fixup! Provide an option to disable entity metadata rewriting
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 c3268cbe..f9f6d3fc 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -360,7 +360,8 @@ public class ServerConnector extends PacketHandler
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.getDeathLocation(), login.getPortalCooldown() ) );
}
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.getSimulationDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat(), login.getDeathLocation(), login.getPortalCooldown() );
+ (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.getSimulationDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isLimitedCrafting(), login.isDebug(), login.isFlat(), login.getDeathLocation(),
+ login.getPortalCooldown() );
user.unsafe().sendPacket(modLogin);
// Only send if we're in the same dimension
if ( login.getDimension() == user.getDimension() ) // Waterfall - defer
--
2.42.0

View File

@ -1,31 +0,0 @@
From e842f41a2be52657911f9a4e35b7a84d9084e92d Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 21 Sep 2023 11:31:06 +0100
Subject: [PATCH] fixup! Provide an option to disable entity metadata rewriting
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 f9f6d3fc..55218447 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -357,7 +357,7 @@ public class ServerConnector extends PacketHandler
// Only send if we are not in the same dimension
if ( login.getDimension() != user.getDimension() ) // Waterfall - defer
{
- 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.getDeathLocation(), login.getPortalCooldown() ) );
+ 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(), (byte) 0, login.getDeathLocation(), login.getPortalCooldown() ) );
}
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.getSimulationDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isLimitedCrafting(), login.isDebug(), login.isFlat(), login.getDeathLocation(),
@@ -366,7 +366,7 @@ public class ServerConnector extends PacketHandler
// Only send if we're in the same dimension
if ( login.getDimension() == user.getDimension() ) // Waterfall - defer
{
- user.unsafe().sendPacket( new Respawn( (Integer) login.getDimension() >= 0 ? -1 : 0, login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), false, login.getDeathLocation(), login.getPortalCooldown() ) );
+ user.unsafe().sendPacket( new Respawn( (Integer) login.getDimension() >= 0 ? -1 : 0, login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), (byte) 0, login.getDeathLocation(), login.getPortalCooldown() ) );
}
}
// Waterfall end
--
2.42.0