Examples of toVec3()


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

      Vector3f posVec = new Vector3f(posX, posY, posZ);
      Vector3f motVec = new Vector3f(motionX, motionY, motionZ);
      Vector3f nextPosVec = Vector3f.add(posVec, motVec, null);
     
      //Raytrace the motion of this grenade
      MovingObjectPosition hit = worldObj.rayTraceBlocks(posVec.toVec3(), nextPosVec.toVec3());
      //If we hit block
      if(hit != null && hit.typeOfHit == MovingObjectType.BLOCK)
      {
        //Get the blockID and block material
        Block block = worldObj.getBlock(hit.blockX, hit.blockY, hit.blockZ);
View Full Code Here

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

       
        worldObj.spawnEntityInWorld(new EntityDebugVector(worldObj, lookOrigin, lookVector, 20));
       
        Vector3f lookTarget = Vector3f.add(lookVector, lookOrigin, null);
       
        MovingObjectPosition hit = worldObj.rayTraceBlocks(lookOrigin.toVec3(), lookTarget.toVec3());
       
        //MovingObjectPosition hit = ((EntityLivingBase)seats[0].riddenByEntity).rayTrace(reach, 1F);
        if(hit != null && hit.typeOfHit == MovingObjectType.BLOCK)
        {
          if(breakingBlock == null || breakingBlock.x != hit.blockX || breakingBlock.y != hit.blockY || breakingBlock.z != hit.blockZ)
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.