mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Log when it's likely the indexedcodec is gonna fail, because of LAN server derps likely. Try and give some context for debuggers.
This commit is contained in:
1 parent
34382745ab
commit
c88bc769ef
1 file changed
+4
+4
@@ -70,6 +70,10 @@ public abstract class FMLIndexedMessageToMessageCodec<A> extends MessageToMessag
|
||||
{
|
||||
testMessageValidity(msg);
|
||||
ByteBuf payload = msg.payload().copy();
|
||||
if (payload.readableBytes() < 1)
|
||||
{
|
||||
FMLLog.log(Level.ERROR, "The FMLIndexedCodec has received an empty buffer on channel %s, likely a result of a LAN server issue. Pipeline parts : %s", ctx.channel().attr(NetworkRegistry.FML_CHANNEL), ctx.pipeline().toString());
|
||||
}
|
||||
byte discriminator = payload.readByte();
|
||||
Class<? extends A> clazz = discriminators.get(discriminator);
|
||||
if(clazz == null)
|
||||
|
||||
Reference in new issue
Block a user