mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fix REPLY handling in SimpleNetworkWrapper. Closes #440
This commit is contained in:
1 parent
8883803260
commit
8e64a82423
1 file changed
+2
+2
@@ -4,6 +4,7 @@ import org.apache.logging.log4j.Level;
|
||||
import net.minecraft.network.INetHandler;
|
||||
import com.google.common.base.Throwables;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.network.FMLOutboundHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
@@ -33,6 +34,7 @@ public class SimpleChannelHandlerWrapper<REQ extends IMessage, REPLY extends IMe
|
||||
REPLY result = messageHandler.onMessage(msg, context);
|
||||
if (result != null)
|
||||
{
|
||||
ctx.channel().attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.REPLY);
|
||||
ctx.writeAndFlush(result).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user