This commit is contained in:
creeper123123321 2019-02-08 18:35:57 -02:00
parent 9d2103b011
commit d2ce6f141b
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -26,7 +26,6 @@ package com.github.creeper123123321.viafabric.mixin;
import com.github.creeper123123321.viafabric.handler.serverside.FabricDecodeHandler; import com.github.creeper123123321.viafabric.handler.serverside.FabricDecodeHandler;
import com.github.creeper123123321.viafabric.handler.serverside.FabricEncodeHandler; import com.github.creeper123123321.viafabric.handler.serverside.FabricEncodeHandler;
import com.github.creeper123123321.viafabric.platform.VRClientSideUserConnection;
import com.github.creeper123123321.viafabric.protocol.ClientSideInterceptor; import com.github.creeper123123321.viafabric.protocol.ClientSideInterceptor;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.SocketChannel;
@ -44,7 +43,7 @@ public class MixinClientConnectionServerChInit {
@Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At(value = "TAIL"), remap = false) @Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At(value = "TAIL"), remap = false)
private void onInitChannel(Channel channel, CallbackInfo ci) { private void onInitChannel(Channel channel, CallbackInfo ci) {
if (channel instanceof SocketChannel) { if (channel instanceof SocketChannel) {
UserConnection user = new VRClientSideUserConnection(channel); UserConnection user = new UserConnection(channel);
new ProtocolPipeline(user).add(new ClientSideInterceptor()); new ProtocolPipeline(user).add(new ClientSideInterceptor());
MessageToByteEncoder oldEncoder = (MessageToByteEncoder) channel.pipeline().get("encoder"); MessageToByteEncoder oldEncoder = (MessageToByteEncoder) channel.pipeline().get("encoder");