private void lookAt(Entity entity, Vector3d vector3d) {
Vector3d vector3d2 = entity.getPositionVec().add(0.0, entity.getEyeHeight(), 0.0);
Vector3d vector3d3 = vector3d.subtract(vector3d2).normalize();
float f = (float)(-Math.toDegrees(Math.asin(vector3d3.y)));
float f2 = (float)Math.toDegrees(Math.atan2(vector3d3.z, vector3d3.x)) - 90.0f;
entity.rotationYaw = this.updateRotation(entity.rotationYaw, f2, 90.0f);
entity.rotationPitch = this.updateRotation(entity.rotationPitch, f, 90.0f);
}