mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 18:39:23 +00:00
[ci skip] cleanup
This commit is contained in:
@@ -5,19 +5,10 @@ Subject: [PATCH] Alternative join logic
|
||||
|
||||
|
||||
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
|
||||
index f998cf8d70302a21289de4d84b46d322d0b8a8fe..a0df7cb76b5877a0fcfcac457c5031502ecd18f5 100644
|
||||
index f998cf8d70302a21289de4d84b46d322d0b8a8fe..7423729fc9a6501c3a6408442ce28066067ce865 100644
|
||||
--- a/net/minecraft/network/Connection.java
|
||||
+++ b/net/minecraft/network/Connection.java
|
||||
@@ -66,6 +66,8 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.Marker;
|
||||
import org.slf4j.MarkerFactory;
|
||||
|
||||
+import static org.dreeam.leaf.config.modules.network.AlternativeJoin.AlternativeJoin;
|
||||
+
|
||||
public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
private static final float AVERAGE_PACKETS_SMOOTHING = 0.75F;
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -341,35 +343,54 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -341,35 +341,54 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
this.validateListener(protocolInfo, packetInfo);
|
||||
if (protocolInfo.flow() != this.getReceiving()) {
|
||||
throw new IllegalStateException("Invalid inbound protocol: " + protocolInfo.id());
|
||||
@@ -31,7 +22,7 @@ index f998cf8d70302a21289de4d84b46d322d0b8a8fe..a0df7cb76b5877a0fcfcac457c503150
|
||||
+ inboundConfigurationTask = inboundConfigurationTask.andThen(context -> context.pipeline().addAfter("decoder", "bundler", (ChannelHandler)packetBundlePacker));
|
||||
+ }
|
||||
+ ChannelFuture future = this.channel.writeAndFlush(inboundConfigurationTask);
|
||||
+ if (!AlternativeJoin) {
|
||||
+ if (!org.dreeam.leaf.config.modules.network.AlternativeJoin.AlternativeJoin) {
|
||||
+ Connection.syncAfterConfigurationChange(future);
|
||||
} else {
|
||||
- this.packetListener = packetInfo;
|
||||
@@ -69,7 +60,7 @@ index f998cf8d70302a21289de4d84b46d322d0b8a8fe..a0df7cb76b5877a0fcfcac457c503150
|
||||
+ ChannelFuture future = this.channel.writeAndFlush(outboundConfigurationTask.andThen(context -> {
|
||||
+ this.sendLoginDisconnect = flag;
|
||||
+ }));
|
||||
+ if (!AlternativeJoin) {
|
||||
+ if (!org.dreeam.leaf.config.modules.network.AlternativeJoin.AlternativeJoin) {
|
||||
+ Connection.syncAfterConfigurationChange(future);
|
||||
} else {
|
||||
- UnconfiguredPipelineHandler.OutboundConfigurationTask outboundConfigurationTask = UnconfiguredPipelineHandler.setupOutboundProtocol(protocolInfo);
|
||||
|
||||
Reference in New Issue
Block a user