code: private <T extends Block> List<T> getBlocks(Block currentBlock, Axes axes, List<T> blocksOut)
      {
          List<T> newBlocks = blocksOut;
  
          List<T> nextBlocks = getBlocks(currentBlock, axes);
          if (!nextBlocks.isEmpty()) {
              if (newBlocks == null) {
                  newBlocks = nextBlocks;
              } else {
                  newBlocks.addAll(nextBlocks);
              }
          }
  
          return newBlocks;
      }
docs: Add all blocks following provided {@link BlockMatcher} and {@link Axes} in the provide list (or create a new list
  of provided list is null).
  
  @param <T> the class of the Blocks to return
  @param currentBlock the block to search from
  @param axes the axes
  @param blocksOut the list of blocks to fill
  @return the modified list, null if provided list is null and provided {@link Block} does not validate provided
  {@link BlockMatcher}