From 8083f7043566bdb4c02ad0cd7a745e248276f9c5 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Thu, 6 Apr 2023 19:54:22 -0400 Subject: [PATCH] KQueue no longer needs to be shaded in on Spigot/Fabric --- bootstrap/fabric/build.gradle.kts | 3 ++- bootstrap/spigot/build.gradle.kts | 2 +- .../org/geysermc/geyser/network/GeyserServerInitializer.java | 1 + .../java/org/geysermc/geyser/network/netty/RakPingHandler.java | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap/fabric/build.gradle.kts b/bootstrap/fabric/build.gradle.kts index 35270df80..e85c2f809 100644 --- a/bootstrap/fabric/build.gradle.kts +++ b/bootstrap/fabric/build.gradle.kts @@ -68,10 +68,11 @@ tasks { relocate("net.kyori", "org.geysermc.relocate.kyori") dependencies { - // Exclude everything EXCEPT KQueue and some DNS stuff required for HAProxyc + // Exclude everything EXCEPT some DNS stuff required for HAProxy exclude(dependency("io.netty:netty-transport-classes-epoll:.*")) exclude(dependency("io.netty:netty-transport-native-epoll:.*")) exclude(dependency("io.netty:netty-transport-native-unix-common:.*")) + exclude(dependency("io.netty:netty-transport-classes-kqueue:.*")) exclude(dependency("io.netty:netty-transport-native-kqueue:.*")) exclude(dependency("io.netty:netty-handler:.*")) exclude(dependency("io.netty:netty-common:.*")) diff --git a/bootstrap/spigot/build.gradle.kts b/bootstrap/spigot/build.gradle.kts index aa7958732..58ea763eb 100644 --- a/bootstrap/spigot/build.gradle.kts +++ b/bootstrap/spigot/build.gradle.kts @@ -29,7 +29,6 @@ platformRelocate("com.fasterxml.jackson") platformRelocate("net.kyori", "net.kyori.adventure.text.logger.slf4j.ComponentLogger") platformRelocate("org.objectweb.asm") platformRelocate("me.lucko.commodore") -platformRelocate("io.netty.channel.kqueue") // These dependencies are already present on the platform provided(libs.viaversion) @@ -50,6 +49,7 @@ tasks.withType { exclude(dependency("io.netty:netty-transport-classes-epoll:.*")) exclude(dependency("io.netty:netty-transport-native-epoll:.*")) exclude(dependency("io.netty:netty-transport-native-unix-common:.*")) + exclude(dependency("io.netty:netty-transport-classes-kqueue:.*")) exclude(dependency("io.netty:netty-transport-native-kqueue:.*")) exclude(dependency("io.netty:netty-handler:.*")) exclude(dependency("io.netty:netty-common:.*")) diff --git a/core/src/main/java/org/geysermc/geyser/network/GeyserServerInitializer.java b/core/src/main/java/org/geysermc/geyser/network/GeyserServerInitializer.java index 9bcf30789..126847cd5 100644 --- a/core/src/main/java/org/geysermc/geyser/network/GeyserServerInitializer.java +++ b/core/src/main/java/org/geysermc/geyser/network/GeyserServerInitializer.java @@ -43,6 +43,7 @@ public class GeyserServerInitializer extends BedrockServerInitializer { this.geyser = geyser; } + //TODO /* @Override public boolean onConnectionRequest(InetSocketAddress inetSocketAddress) { diff --git a/core/src/main/java/org/geysermc/geyser/network/netty/RakPingHandler.java b/core/src/main/java/org/geysermc/geyser/network/netty/RakPingHandler.java index ecdd6585e..98d9c3e3c 100644 --- a/core/src/main/java/org/geysermc/geyser/network/netty/RakPingHandler.java +++ b/core/src/main/java/org/geysermc/geyser/network/netty/RakPingHandler.java @@ -41,7 +41,7 @@ public class RakPingHandler extends SimpleChannelInboundHandler { private final GeyserServer server; @Override - protected void channelRead0(ChannelHandlerContext ctx, RakPing msg) throws Exception { + protected void channelRead0(ChannelHandlerContext ctx, RakPing msg) { long guid = ctx.channel().config().getOption(RakChannelOption.RAK_GUID); RakPong pong = msg.reply(guid, this.server.onQuery(msg.getSender()).toByteBuf());