Package com.flansmod.common.vector

Examples of com.flansmod.common.vector.Vector3f.lengthSquared()


    {
      Vector3f motVec = new Vector3f(motionX, motionY, motionZ);
      List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox);
      for(Object obj : list)
      {
        if(obj == thrower && ticksExisted < 10 || motVec.lengthSquared() < 0.01D)
          continue;
        if(obj instanceof EntityLivingBase)
          ((EntityLivingBase)obj).attackEntityFrom(getGrenadeDamage(), type.damageVsLiving * motVec.lengthSquared() * 3);
      }
    }
 
View Full Code Here


      for(Object obj : list)
      {
        if(obj == thrower && ticksExisted < 10 || motVec.lengthSquared() < 0.01D)
          continue;
        if(obj instanceof EntityLivingBase)
          ((EntityLivingBase)obj).attackEntityFrom(getGrenadeDamage(), type.damageVsLiving * motVec.lengthSquared() * 3);
      }
    }
 
    //Apply gravity
    motionY -= 9.81D / 400D * type.fallSpeed;
 
View Full Code Here

        */
      }
     
      Vector3f intent = new Vector3f(moveX, 0, moveZ);
     
      if(Math.abs(intent.lengthSquared()) > 0.1)
      {
        intent.normalise();
       
        ++legSwing;
     
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.