mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 12:42:26 +00:00
Add null check and informative error message when client receives an invalid update packet (#3266)
(cherry picked from commit 882e0e3bf2)
This commit is contained in:
1 parent
4b7219c07f
commit
621d67d36a
1 file changed
+8
-3
@@ -46,18 +46,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1205,6 +1207,10 @@
|
||||
@@ -1205,6 +1207,15 @@
|
||||
{
|
||||
tileentity.func_145839_a(p_147273_1_.func_148857_g());
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ if(tileentity == null)
|
||||
+ {
|
||||
+ field_147301_d.error("Received invalid update packet for null tile entity at {} with data: {}", p_147273_1_.func_179823_a(), p_147273_1_.func_148857_g());
|
||||
+ return;
|
||||
+ }
|
||||
+ tileentity.onDataPacket(field_147302_e, p_147273_1_);
|
||||
+ }
|
||||
|
||||
if (flag && this.field_147299_f.field_71462_r instanceof GuiCommandBlock)
|
||||
{
|
||||
@@ -1302,15 +1308,15 @@
|
||||
@@ -1302,15 +1313,15 @@
|
||||
}
|
||||
else if (f == 101.0F)
|
||||
{
|
||||
@@ -76,7 +81,7 @@
|
||||
}
|
||||
}
|
||||
else if (i == 6)
|
||||
@@ -1424,7 +1430,7 @@
|
||||
@@ -1424,7 +1435,7 @@
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user