private void moveTowardsTarget() {
rotationYaw = (float) Math.toRadians(yawDegreesBetweenPoints(getPosX(), getPosY(), getPosZ(), target.getPosX(), target.getPosY(), target.getPosZ()));
rotationPitch = (float) Math.toRadians(pitchDegreesBetweenPoints(getPosX(), getPosY(), getPosZ(), target.getPosX(), target.getPosY(), target.getPosZ()));
Vec3d moveVec = lookVector(this.rotationYaw, this.rotationPitch).scale(SPEED);
this.setMotion(
0.5f * this.getMotion().getX() + 0.5f * moveVec.x,
0.5f * this.getMotion().getY() + 0.5f * moveVec.y,
0.5f * this.getMotion().getZ() + 0.5f * moveVec.z);
}