From aaf47afff2bf5fa9b3ae16f67f55c78df314f75b Mon Sep 17 00:00:00 2001 From: Ben Staddon Date: Sun, 19 Nov 2017 19:47:51 +0000 Subject: [PATCH] Fix errors caused by multi-target messages sent from LAN host (#4536) --- .../minecraftforge/fml/common/network/FMLOutboundHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraftforge/fml/common/network/FMLOutboundHandler.java b/src/main/java/net/minecraftforge/fml/common/network/FMLOutboundHandler.java index 196cf12d8..a84b9ef48 100644 --- a/src/main/java/net/minecraftforge/fml/common/network/FMLOutboundHandler.java +++ b/src/main/java/net/minecraftforge/fml/common/network/FMLOutboundHandler.java @@ -304,8 +304,10 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter { } for (NetworkDispatcher targetDispatcher : dispatchers) { - targetDispatcher.sendProxy((FMLProxyPacket) msg); + pkt.payload().retain(); + targetDispatcher.sendProxy(pkt); } + pkt.payload().release(); } }