diff --git a/gradle.properties b/gradle.properties index 98c5de88..9d6eb0b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,11 +3,11 @@ org.gradle.jvmargs=-Xms32M -Xmx4G -XX:+UseG1GC -XX:+UseStringDeduplication loader_version=0.14.21 -viaver_version=4.8.0-1.20.2-rc1-SNAPSHOT +viaver_version=4.8.0-1.20.2-rc2-SNAPSHOT yaml_version=2.0 publish_mc_versions=1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5, 1.15.2, 1.14.4, 1.8.9 # example: 1.19.1-rc1. Can be a blank value -modrinth_mc_snapshot=1.20.2-rc1 +modrinth_mc_snapshot=1.20.2-rc2 # example: 1.19-Snapshot. Can be a blank value curseforge_mc_snapshot=1.20.2-Snapshot diff --git a/viafabric-mc120/src/main/java/com/viaversion/fabric/mc120/service/ProtocolAutoDetector.java b/viafabric-mc120/src/main/java/com/viaversion/fabric/mc120/service/ProtocolAutoDetector.java index a2d57f51..ac3b0e3c 100644 --- a/viafabric-mc120/src/main/java/com/viaversion/fabric/mc120/service/ProtocolAutoDetector.java +++ b/viafabric-mc120/src/main/java/com/viaversion/fabric/mc120/service/ProtocolAutoDetector.java @@ -52,10 +52,10 @@ public class ProtocolAutoDetector { .handler(new ChannelInitializer<>() { @Override protected void initChannel(@NotNull Channel channel) { + channel.attr(ClientConnection.SERVERBOUND_PROTOCOL_KEY) + .set(NetworkState.HANDSHAKING.getHandler(NetworkSide.SERVERBOUND)); channel.attr(ClientConnection.CLIENTBOUND_PROTOCOL_KEY) .set(NetworkState.STATUS.getHandler(NetworkSide.CLIENTBOUND)); - channel.attr(ClientConnection.SERVERBOUND_PROTOCOL_KEY) - .set(NetworkState.STATUS.getHandler(NetworkSide.SERVERBOUND)); try { channel.config().setOption(ChannelOption.TCP_NODELAY, true); channel.config().setOption(ChannelOption.IP_TOS, 0x18); // Stolen from Velocity, low delay, high reliability @@ -115,6 +115,9 @@ public boolean isConnectionOpen() { address.getPort(), ConnectionIntent.STATUS )); + + ch.channel().attr(ClientConnection.SERVERBOUND_PROTOCOL_KEY) + .set(NetworkState.STATUS.getHandler(NetworkSide.SERVERBOUND)); clientConnection.send(new QueryRequestC2SPacket()); }); }