From 44e21eccd5ca7e3e61230de0c00436129a5432cb Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Tue, 11 Apr 2023 22:10:48 +0200 Subject: [PATCH] Updated Via* --- build.gradle | 2 +- .../client2proxy/eaglercraft/EaglercraftInitialHandler.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 50339eb..4b63ff6 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ dependencies { exclude group: "com.google.guava", module: "guava" } include "com.viaversion:viarewind-core:2.0.4-SNAPSHOT" - include "net.raphimc:ViaLegacy:2.2.13" + include "net.raphimc:ViaLegacy:2.2.14" include "net.raphimc:ViaAprilFools:2.0.6" include("net.raphimc:ViaBedrock:0.0.1-SNAPSHOT") { exclude group: "io.netty", module: "netty-codec-http" diff --git a/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/eaglercraft/EaglercraftInitialHandler.java b/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/eaglercraft/EaglercraftInitialHandler.java index eb4c4f5..16fa442 100644 --- a/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/eaglercraft/EaglercraftInitialHandler.java +++ b/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/eaglercraft/EaglercraftInitialHandler.java @@ -68,6 +68,8 @@ public class EaglercraftInitialHandler extends ByteToMessageDecoder { ctx.pipeline().addBefore(Client2ProxyChannelInitializer.EAGLERCRAFT_INITIAL_HANDLER_NAME, Client2ProxyChannelInitializer.WEBSOCKET_ACTIVE_NOTIFIER_NAME, new WebSocketActiveNotifier()); ctx.pipeline().addBefore(Client2ProxyChannelInitializer.EAGLERCRAFT_INITIAL_HANDLER_NAME, Client2ProxyChannelInitializer.EAGLERCRAFT_HANDLER_NAME, new EaglercraftHandler()); + ctx.fireUserEventTriggered(EaglercraftClientConnected.INSTANCE); + ctx.pipeline().fireChannelRead(in.readBytes(in.readableBytes())); } else { out.add(in.readBytes(in.readableBytes())); @@ -77,4 +79,8 @@ public class EaglercraftInitialHandler extends ByteToMessageDecoder { } } + public static final class EaglercraftClientConnected { + public static final EaglercraftClientConnected INSTANCE = new EaglercraftClientConnected(); + } + }