Skip to content

Commit

Permalink
Tweak so that writing to the context will automatically send a messag…
Browse files Browse the repository at this point in the history
…e back to

the originator in handshakeestablished.
  • Loading branch information
cpw committed Feb 2, 2014
1 parent 359ac3c commit cee0f0b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.discovery.ASMDataTable;
import cpw.mods.fml.common.network.FMLOutboundHandler.OutboundTarget;
import cpw.mods.fml.common.network.handshake.NetworkDispatcher;
import cpw.mods.fml.common.network.internal.FMLProxyPacket;
import cpw.mods.fml.common.network.internal.NetworkModHolder;
Expand Down Expand Up @@ -311,6 +312,8 @@ public void fireNetworkHandshake(NetworkDispatcher networkDispatcher, Side origi
NetworkHandshakeEstablished handshake = new NetworkHandshakeEstablished(networkDispatcher, networkDispatcher.getNetHandler(), origin);
for (Entry<String, FMLEmbeddedChannel> channel : channels.get(origin).entrySet())
{
channel.getValue().attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.DISPATCHER);
channel.getValue().attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(networkDispatcher);
channel.getValue().pipeline().fireUserEventTriggered(handshake);
}
}
Expand Down

0 comments on commit cee0f0b

Please sign in to comment.