|
13 | 13 | import net.lenni0451.reflect.Agents; |
14 | 14 | import org.cloudburstmc.netty.channel.raknet.RakChannelFactory; |
15 | 15 | import org.cloudburstmc.netty.channel.raknet.config.RakChannelOption; |
| 16 | +import org.cloudburstmc.netty.channel.raknet.config.RakServerCookieMode; |
16 | 17 | import org.cloudburstmc.netty.handler.codec.raknet.server.RakServerOfflineHandler; |
17 | 18 | import org.cloudburstmc.netty.handler.codec.raknet.server.RakServerRateLimiter; |
18 | 19 | import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec; |
19 | 20 | import org.cloudburstmc.protocol.bedrock.codec.v818.Bedrock_v818; |
20 | 21 | import org.cloudburstmc.protocol.bedrock.codec.v844.Bedrock_v844; |
| 22 | +import org.cloudburstmc.protocol.bedrock.codec.v944.Bedrock_v944; |
21 | 23 | import org.geysermc.event.subscribe.Subscribe; |
22 | 24 | import org.geysermc.geyser.GeyserImpl; |
23 | 25 | import org.geysermc.geyser.api.event.lifecycle.GeyserPostInitializeEvent; |
|
50 | 52 | public class GeyserReversion implements Extension { |
51 | 53 | public static ExtensionLogger LOGGER; |
52 | 54 |
|
53 | | - public static BedrockCodec OLDEST_GEYSER_CODEC = CodecUtil.rebuildCodec(Bedrock_v844.CODEC); |
| 55 | + public static BedrockCodec OLDEST_GEYSER_CODEC = CodecUtil.rebuildCodec(Bedrock_v944.CODEC); |
54 | 56 |
|
55 | 57 | private static final TransportHelper.TransportType TRANSPORT = TransportHelper.TRANSPORT_TYPE; |
56 | 58 |
|
@@ -112,7 +114,7 @@ public void onGeyserPostInitializeEvent(GeyserPostInitializeEvent event) { |
112 | 114 | .option(RakChannelOption.RAK_MAX_MTU, geyser.config().advanced().bedrock().mtu()) |
113 | 115 | .option(RakChannelOption.RAK_PACKET_LIMIT, rakPacketLimit) |
114 | 116 | .option(RakChannelOption.RAK_GLOBAL_PACKET_LIMIT, rakGlobalPacketLimit) |
115 | | - .option(RakChannelOption.RAK_SEND_COOKIE, rakSendCookie) |
| 117 | + .option(RakChannelOption.RAK_SERVER_COOKIE_MODE, rakSendCookie ? RakServerCookieMode.ACTIVE : RakServerCookieMode.INVALID) |
116 | 118 | .childHandler(serverInitializer); |
117 | 119 |
|
118 | 120 | Bootstraps.setupBootstrap(bootstrap, TransportHelper.TRANSPORT_TYPE); |
|
0 commit comments