Package net.minecraft.util

Examples of net.minecraft.util.Vec3.addVector()


          otherDecay = quantaPerBlock - getQuantaValue(world, x2, y - 1, z2);

          if(otherDecay >= 0)
          {
            int power = otherDecay - (decay - quantaPerBlock);
            vec = vec.addVector((x2 - x) * power, (y - y) * power, (z2 - z) * power);
          }
        }
      }
      else if(otherDecay >= 0)
      {
View Full Code Here


        }
      }
      else if(otherDecay >= 0)
      {
        int power = otherDecay - decay;
        vec = vec.addVector((x2 - x) * power, (y - y) * power, (z2 - z) * power);
      }
    }

    if(world.getBlockId(x, y + 1, z) == blockID)
    {
View Full Code Here

                {
                    otherDecay = quantaPerBlock - getQuantaValue(world, x2, y - 1, z2);
                    if (otherDecay >= 0)
                    {
                        int power = otherDecay - (decay - quantaPerBlock);
                        vec = vec.addVector((x2 - x) * power, (y - y) * power, (z2 - z) * power);
                    }
                }
            }
            else if (otherDecay >= 0)
            {
View Full Code Here

                }
            }
            else if (otherDecay >= 0)
            {
                int power = otherDecay - decay;
                vec = vec.addVector((x2 - x) * power, (y - y) * power, (z2 - z) * power);
            }
        }

        if (world.getBlock(x, y + 1, z) == this)
        {
View Full Code Here

          b0 = 2;
        }
        if(vec38 == vec37) {
          b0 = 3;
        }
        return new MovingObjectPosition(x, y, z, b0, vec38.addVector(x, y, z));
      }
    }
    RaytraceResult raytraceResult = doRayTrace(world, x, y, z, origin, direction);

    if (raytraceResult == null) {
View Full Code Here

    EnumSet<ForgeDirection> possibleDirections = iHost.getTargets();
    for (ForgeDirection s : possibleDirections)
    {
      Vec3 from = Vec3.createVectorHelper( tile.xCoord + 0.5, tile.yCoord + 0.5, tile.zCoord + 0.5 );
      from = from.addVector( s.offsetX * 0.501, s.offsetY * 0.501, s.offsetZ * 0.501 );
      Vec3 to = from.addVector( s.offsetX, s.offsetY, s.offsetZ );

      Block blk = w.getBlock( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
      MovingObjectPosition mop = w.rayTraceBlocks( from, to, true );

View Full Code Here

            byte0 = 1;
        if (vec3d8 == vec3d6)
            byte0 = 2;
        if (vec3d8 == vec3d7)
            byte0 = 3;
        return new MovingObjectPosition(i, j, k, byte0, vec3d8.addVector(i, j, k));
    }

    private static boolean isVecInsideYZBounds(Vec3 vec3d) {
        if (vec3d == null)
            return false;
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.