From f0d8b887b47f6a7dd261044faab48f999dc4f13f Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 29 Aug 2014 21:43:17 -0400 Subject: [PATCH] Fix bug with entityspawn - if the entity doesn't extend livingbase, it fails to write a headyaw byte, and everything will be derped for that packet. Fixes #499, but probably a bunch of others. --- .../cpw/mods/fml/common/network/internal/FMLMessage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java b/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java index 0da5dcd509..56357a7fcd 100644 --- a/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java +++ b/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java @@ -186,7 +186,10 @@ public abstract class FMLMessage { { buf.writeByte((byte) (((EntityLivingBase)entity).rotationYawHead * 256.0F / 360.0F)); } - + else + { + buf.writeByte(0); + } ByteBuf tmpBuf = Unpooled.buffer(); PacketBuffer pb = new PacketBuffer(tmpBuf); try