Examples of calculateIntercept()


Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

    {
      if (possibleHits != null && possibleHits.canBeCollidedWith() && possibleHits.boundingBox != null)
      {
        float border = possibleHits.getCollisionBorderSize();
        AxisAlignedBB aabb = possibleHits.boundingBox.expand(border, border, border);
        MovingObjectPosition hitMOP = aabb.calculateIntercept(startingPosition, target.toVec3());

        if (hitMOP != null)
        {
          if (aabb.isVecInside(startingPosition))
          {
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

                if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
                {
                    f1 = 0.3F;
                    AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
                    MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);

                    if (movingobjectposition1 != null)
                    {
                        double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

        {
            if (entityHit != null && entityHit.canBeCollidedWith() && entityHit.boundingBox != null)
            {
                float border = entityHit.getCollisionBorderSize();
                AxisAlignedBB aabb = entityHit.boundingBox.expand(border, border, border);
                MovingObjectPosition hitMOP = aabb.calculateIntercept(startingPosition, reachPoint);

                if (hitMOP != null)
                {
                    if (aabb.isVecInside(startingPosition))
                    {
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

        }
        for (Entity entityHit : (Iterable<Entity>) entitiesHit) {
            if (entityHit != null && entityHit.canBeCollidedWith() && entityHit.boundingBox != null) {
                float border = entityHit.getCollisionBorderSize();
                AxisAlignedBB aabb = entityHit.boundingBox.expand((double) border, (double) border, (double) border);
                MovingObjectPosition hitMOP = aabb.calculateIntercept(playerPosition, playerViewOffset);

                if (hitMOP != null) {
                    if (aabb.isVecInside(playerPosition)) {
                        if (0.0D < closestEntity || closestEntity == 0.0D) {
                            pickedEntity = new MovingObjectPosition(entityHit);
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

        Entity entity1 = list.get(i);

        if (entity1.canBeCollidedWith() && (entity1 != this.field_146042_b || this.field_146047_aw >= 5)) {
          float f = 0.3F;
          AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f);
          MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec31, vec3);

          if (movingobjectposition1 != null) {
            d2 = vec31.distanceTo(movingobjectposition1.hitVec);

            if (d2 < d0 || d0 == 0.0D) {
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

 
  // Called in Block.collisionRayTrace.
  public MovingObjectPosition rayTrace(World world, int x, int y, int z, Vec3 start, Vec3 end) {
   
    AxisAlignedBB aabb = tileEntity.getBlockType().getCollisionBoundingBoxFromPool(world, x, y, z);
    MovingObjectPosition target = aabb.calculateIntercept(start, end);
    EntityPlayer player = playerLocal.get();
   
    double distance = ((target != null) ? start.distanceTo(target.hitVec) : Double.MAX_VALUE);
    for (Attachment attachment : this) {
      if (!attachment.boxVisible(player)) continue;
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

   
    double distance = ((target != null) ? start.distanceTo(target.hitVec) : Double.MAX_VALUE);
    for (Attachment attachment : this) {
      if (!attachment.boxVisible(player)) continue;
      AxisAlignedBB attachmentBox = attachment.getHighlightBox();
      MovingObjectPosition attachmentTarget = attachmentBox.calculateIntercept(start, end);
      if (attachmentTarget == null) continue;
      double attachmentDistance = start.distanceTo(attachmentTarget.hitVec);
      if (attachmentDistance >= distance) continue;
      distance = attachmentDistance;
      target = attachmentTarget;
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

            if ( entity1.riddenByEntity == p )
              continue;

            f1 = 0.3F;
            AxisAlignedBB boundingBox = entity1.boundingBox.expand( f1, f1, f1 );
            MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );

            if ( movingObjectPosition != null )
            {
              double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

            continue;

          float f1 = 0.3F;

          AxisAlignedBB boundingBox = entity1.boundingBox.expand( f1, f1, f1 );
          MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );

          if ( movingObjectPosition != null )
          {
            double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
View Full Code Here

Examples of net.minecraft.util.AxisAlignedBB.calculateIntercept()

              continue;

            float f1 = 0.3F;

            AxisAlignedBB boundingBox = entity1.boundingBox.expand( f1, f1, f1 );
            MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );

            if ( movingObjectPosition != null )
            {
              double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
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.