Advertisement
Corosus

Untitled

Aug 13th, 2011
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. //initial target vector calculation - do every tick, fix for proper targeting variables
  2. double var11 = this.targetedEntity.posX - this.posX;
  3. double var13 = this.targetedEntity.boundingBox.minY + (double)(this.targetedEntity.height / 2.0F) - (this.posY + (double)(this.height / 2.0F));
  4. double var15 = this.targetedEntity.posZ - this.posZ;
  5.  
  6.  
  7. //
  8. double var14 = (double)MathHelper.sqrt_double(var8 * var8 + var10 * var10 + var12 * var12);
  9. this.motionX = var8 / var14 * 0.1D;
  10. this.motionY = var10 / var14 * 0.1D;
  11. this.motionZ = var12 / var14 * 0.1D;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement