Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //initial target vector calculation - do every tick, fix for proper targeting variables
- double var11 = this.targetedEntity.posX - this.posX;
- double var13 = this.targetedEntity.boundingBox.minY + (double)(this.targetedEntity.height / 2.0F) - (this.posY + (double)(this.height / 2.0F));
- double var15 = this.targetedEntity.posZ - this.posZ;
- //
- double var14 = (double)MathHelper.sqrt_double(var8 * var8 + var10 * var10 + var12 * var12);
- this.motionX = var8 / var14 * 0.1D;
- this.motionY = var10 / var14 * 0.1D;
- this.motionZ = var12 / var14 * 0.1D;
Advertisement
Add Comment
Please, Sign In to add comment