Throw packet encoding exceptions instead of suppressing them, to prevent corrupt packets (#4144)

This commit is contained in:
mezz 2017-07-07 02:39:27 -07:00 committed by LexManos
parent a886dbde49
commit 3847a2cf5d
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- ../src-base/minecraft/net/minecraft/network/NettyPacketEncoder.java
+++ ../src-work/minecraft/net/minecraft/network/NettyPacketEncoder.java
@@ -52,7 +52,7 @@
}
catch (Throwable throwable)
{
- field_150798_a.error(throwable);
+ throw throwable; // Forge: throw this instead of logging it, to prevent corrupt packets from being sent to the client where they are much harder to debug.
}
}
}