Insert FML packet handler into Vanilla pipelines in case modders send FMLPacket to vanilla. Fixes #3422

This commit is contained in:
LexManos 2016-11-22 12:13:07 -08:00
parent 8719fa0263
commit e03d5915e5
1 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
serverInitiateHandshake();
FMLLog.info("Connection received without FML marker, assuming vanilla.");
this.completeServerSideConnection(ConnectionType.VANILLA);
insertIntoChannel();
}
}
@ -184,6 +185,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
{
if (this.state != null) {
FMLLog.getLogger().log(Level.INFO, "Opening channel which already seems to have a state set. This is a vanilla connection. Handshake handler will stop now");
this.manager.channel().config().setAutoRead(true);
return;
}
FMLLog.getLogger().log(Level.TRACE, "Handshake channel activating");