Tweak so that writing to the context will automatically send a message back to

the originator in handshakeestablished.
This commit is contained in:
Christian committed 2014-02-02 12:11:57 -05:00
1 parent 359ac3ca2a
commit cee0f0b811
1 file changed
+3
@@ -36,6 +36,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
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;
@@ -311,6 +312,8 @@ public enum NetworkRegistry
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);
}
}