Examples of collisionRayTrace()


Examples of net.minecraft.block.Block.collisionRayTrace()

        int j1 = MathHelper.floor_double(startVec.zCoord);
        Block block = world.getBlock(l, i1, j1);
        int k1 = world.getBlockMetadata(l, i1, j1);

        if((!p_147447_4_ || block.getCollisionBoundingBoxFromPool(world, l, i1, j1) != null) && block.canCollideCheck(k1, includeLiquids)) {
          MovingObjectPosition movingobjectposition = block.collisionRayTrace(world, l, i1, j1, startVec, endVec);
          if(movingobjectposition != null) {
            result.add(movingobjectposition);
          }
        }
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

          Block block1 = world.getBlock(l, i1, j1);
          int l1 = world.getBlockMetadata(l, i1, j1);

          if(!p_147447_4_ || block1.getCollisionBoundingBoxFromPool(world, l, i1, j1) != null) {
            if(block1.canCollideCheck(l1, includeLiquids)) {
              MovingObjectPosition movingobjectposition1 = block1.collisionRayTrace(world, l, i1, j1, startVec, endVec);
              if(movingobjectposition1 != null) {
                result.add(movingobjectposition1);
              }
            } else {
              movingobjectposition2 = new MovingObjectPosition(l, i1, j1, b0, startVec, false);
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

    List<MovingObjectPosition> hits = new ArrayList<MovingObjectPosition>();

    for (BlockCoord bc : configurables) {
      Block block = world.getBlock(bc.x, bc.y, bc.z);
      if(block != null) {
        MovingObjectPosition hit = block.collisionRayTrace(world, bc.x, bc.y, bc.z, Vec3.createVectorHelper(start.x, start.y, start.z),
            Vec3.createVectorHelper(end.x, end.y, end.z));
        if(hit != null) {
          hits.add(hit);
        }
      }
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

        int j1 = MathHelper.floor_double(par1Vec3.zCoord);
        Block block = worldObj.getBlock(l, i1, j1);
        int l1 = worldObj.getBlockMetadata(l, i1, j1);

        if (block != null && (!par4 || block == null || block.getCollisionBoundingBoxFromPool(worldObj, l, i1, j1) != null) && block != Blocks.air && block.canCollideCheck(l1, par3)) {
          MovingObjectPosition movingobjectposition = block.collisionRayTrace(worldObj, l, i1, j1, par1Vec3, par2Vec3);

          if (movingobjectposition != null)
            return movingobjectposition;
        }
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

          Block block1 = worldObj.getBlock(l, i1, j1);
          int j2 = worldObj.getBlockMetadata(l, i1, j1);

          if ((!par4 || block1 == null || block1.getCollisionBoundingBoxFromPool(worldObj, l, i1, j1) != null) && block1 != Blocks.air && block1.canCollideCheck(j2, par3)) {
            MovingObjectPosition movingobjectposition1 = block1.collisionRayTrace(worldObj, l, i1, j1, par1Vec3, par2Vec3);

            if (movingobjectposition1 != null)
              return movingobjectposition1;
          }
        }
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

        Vec3 headVec = getCorrectedHeadVec(player);
        Vec3 lookVec = player.getLook(1.0F);
        double reach = getBlockReachDistance(player);
        Vec3 endVec = headVec.addVector(lookVec.xCoord * reach, lookVec.yCoord * reach, lookVec.zCoord * reach);
        return block.collisionRayTrace(world, x, y, z, headVec, endVec);
    }

    private static double getBlockReachDistance_server(EntityPlayerMP player)
    {
        return player.theItemInWorldManager.getBlockReachDistance();
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

    Vec3 headVec = getCorrectedHeadVec(player);
    Vec3 lookVec = player.getLook(1.0F);
    double reach = getBlockReachDistance(player);
    Vec3 endVec = headVec.addVector(lookVec.xCoord * reach, lookVec.yCoord * reach, lookVec.zCoord * reach);
    return block.collisionRayTrace(world, x, y, z, headVec, endVec);
  }

  private static double getBlockReachDistance_server(EntityPlayerMP player) {

    return player.theItemInWorldManager.getBlockReachDistance();
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

      if ( host != null )
      {
        if ( !world.isRemote )
        {
          LookDirection dir = Platform.getPlayerRay( player, getEyeOffset( player ) );
          MovingObjectPosition mop = block.collisionRayTrace( world, x, y, z, dir.a, dir.b );
          if ( mop != null )
          {
            List<ItemStack> is = new LinkedList<ItemStack>();
            SelectedPart sp = selectPart( player, host, mop.hitVec.addVector( -mop.blockX, -mop.blockY, -mop.blockZ ) );
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

    {
      Block block = world.getBlock( x, y, z );
      if ( host != null && player.isSneaking() && block != null )
      {
        LookDirection dir = Platform.getPlayerRay( player, getEyeOffset( player ) );
        MovingObjectPosition mop = block.collisionRayTrace( world, x, y, z, dir.a, dir.b );
        if ( mop != null )
        {
          mop.hitVec = mop.hitVec.addVector( -mop.blockX, -mop.blockY, -mop.blockZ );
          SelectedPart sPart = selectPart( player, host, mop.hitVec );
          if ( sPart != null && sPart.part != null )
View Full Code Here

Examples of net.minecraft.block.Block.collisionRayTrace()

    if ( !world.isRemote )
    {
      Block block = world.getBlock( x, y, z );
      LookDirection dir = Platform.getPlayerRay( player, getEyeOffset( player ) );
      MovingObjectPosition mop = block.collisionRayTrace( world, x, y, z, dir.a, dir.b );
      if ( mop != null )
      {
        SelectedPart sp = selectPart( player, host, mop.hitVec.addVector( -mop.blockX, -mop.blockY, -mop.blockZ ) );

        if ( sp.part != null )
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.