Add new RakNet options to match vanilla behaviour

This commit is contained in:
RaphiMC 2024-09-23 22:00:50 +02:00
parent 556e93a9c5
commit 2bded96990
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94

View File

@ -143,6 +143,7 @@ public class ProtocolTranslator {
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_TIME_BETWEEN_SEND_CONNECTION_ATTEMPTS_MS, 500);
channel.config().setOption(RakChannelOption.RAK_CONNECT_TIMEOUT, channel.config().getOption(ChannelOption.CONNECT_TIMEOUT_MILLIS).longValue());
channel.config().setOption(RakChannelOption.RAK_SESSION_TIMEOUT, 30_000L);
channel.config().setOption(RakChannelOption.RAK_GUID, ThreadLocalRandom.current().nextLong());