Package net.minecraft.src

Examples of net.minecraft.src.Vec3D.dotProduct()


        targetZ - posZ).normalize();
    Vec3D vec3d1 = Vec3D.createVector(
        MathHelper.sin((rotationYaw * 3.141593F) / 180F), motionY,
        -MathHelper.cos((rotationYaw * 3.141593F) / 180F))
        .normalize();
    float f18 = (float) (vec3d1.dotProduct(vec3d) + 0.5D) / 1.5F;
    if (f18 < 0.0F) {
      f18 = 0.0F;
    }
    randomYawVelocity *= 0.8F;
    float f19 = MathHelper.sqrt_double(motionX * motionX + motionZ
View Full Code Here


    } else {
      moveEntity(motionX, motionY, motionZ);
    }
    Vec3D vec3d2 = Vec3D.createVector(motionX, motionY, motionZ)
        .normalize();
    float f22 = (float) (vec3d2.dotProduct(vec3d1) + 1.0D) / 2.0F;
    f22 = 0.8F + 0.15F * f22;
    motionX *= f22;
    motionZ *= f22;
    motionY *= 0.9100000262260437D;
    renderYawOffset = rotationYaw;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.