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.
This commit is contained in:
parent
67ebda9ace
commit
f0d8b887b4
1 changed files with 4 additions and 1 deletions
|
@ -186,7 +186,10 @@ public abstract class FMLMessage {
|
||||||
{
|
{
|
||||||
buf.writeByte((byte) (((EntityLivingBase)entity).rotationYawHead * 256.0F / 360.0F));
|
buf.writeByte((byte) (((EntityLivingBase)entity).rotationYawHead * 256.0F / 360.0F));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buf.writeByte(0);
|
||||||
|
}
|
||||||
ByteBuf tmpBuf = Unpooled.buffer();
|
ByteBuf tmpBuf = Unpooled.buffer();
|
||||||
PacketBuffer pb = new PacketBuffer(tmpBuf);
|
PacketBuffer pb = new PacketBuffer(tmpBuf);
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in a new issue