From 4aa4d8c83c3c3d8437b447d3485c277fb83e5efe Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:16:05 +0200 Subject: [PATCH] Enable RakNet compatibility mode --- .../viafabricplus/protocoltranslator/ProtocolTranslator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java index bb1a7600..f21efb4c 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java @@ -138,6 +138,8 @@ public class ProtocolTranslator { if (serverVersion.equals(BedrockProtocolVersion.bedrockLatest)) { channel.config().setOption(RakChannelOption.RAK_PROTOCOL_VERSION, ProtocolConstants.BEDROCK_RAKNET_PROTOCOL_VERSION); + channel.config().setOption(RakChannelOption.RAK_COMPATIBILITY_MODE, true); + channel.config().setOption(RakChannelOption.RAK_CLIENT_INTERNAL_ADDRESSES, 20); channel.config().setOption(RakChannelOption.RAK_CONNECT_TIMEOUT, 4_000L); channel.config().setOption(RakChannelOption.RAK_SESSION_TIMEOUT, 30_000L); channel.config().setOption(RakChannelOption.RAK_GUID, ThreadLocalRandom.current().nextLong());