Fix replay initialization with login phase on 1.11.2 and below

While this commit also considerably simplifies/cleans the setup
method, the actual fix is that the networkManager is now added
to the channel pipeline with under the "packet_handler" key,
whereas before it was unnamed causing issues when transitioning
to the play state.
This commit is contained in:
Jonas Herzig
2019-05-04 16:24:29 +02:00
parent af86faeaf9
commit 220b22869a
2 changed files with 30 additions and 49 deletions

View File

@@ -705,13 +705,6 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
@SuppressWarnings("unchecked")
public void channelActive(ChannelHandlerContext ctx) throws Exception {
this.ctx = ctx;
//#if MC>=10904
ctx.channel().attr(NetworkManager.PROTOCOL_ATTRIBUTE_KEY).set(EnumConnectionState.PLAY);
//#else
//#if MC>=10800
//$$ ctx.attr(NetworkManager.attrKeyConnectionState).set(EnumConnectionState.PLAY);
//#endif
//#endif
super.channelActive(ctx);
}