Possible fix for the clientside arrow-movement desync

This commit is contained in:
Bernhard Bonigl committed 2014-11-08 14:15:20 +01:00
1 parent cbcac3b5f0
commit 388823599b
1 file changed
+9
@@ -567,6 +567,11 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
// shooting entity
int id = shootingEntity == null ? this.getEntityId() : shootingEntity.getEntityId();
data.writeInt(id);
// motion stuff. This has to be sent separately since MC seems to do hardcoded stuff to arrows with this
data.writeDouble(this.motionX);
data.writeDouble(this.motionY);
data.writeDouble(this.motionZ);
}
@Override
@@ -574,5 +579,9 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
returnStack = ByteBufUtils.readItemStack(data);
rotationYaw = data.readFloat();
shootingEntity = worldObj.getEntityByID(data.readInt());
this.motionX = data.readDouble();
this.motionY = data.readDouble();
this.motionZ = data.readDouble();
}
}